Search
⌘K

Leetcode 406. Queue Reconstruction by Height

Given pairs (h, k) where k is the number of people with height >= h standing in front of that person, reconstruct the queue ordering that satisfies all constraints. This is a greedy/reconstruction problem typically solved by processing taller people first and inserting each person at position k to preserve the counts.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.