Problem 406 · Medium

Queue Reconstruction by Height

Reconstruct queue from (height, k) pairs where k is the count of people taller or equal height before this person.

Open the interactive visualisation