LeanCode Interview Question

One blatantly simple frontend task