Problem
People stood in a queue, but the list got shuffled. Each entry people[i] = [h, k] says the person has height h and that exactly k people in front of them are at least as tall as they are. Rebuild the queue and return it, front first.
Example 1
people = [[7, 0], [4, 4], [7, 1], [5, 0], [6, 1], [5, 2]]
Example 2
→ [[5, 0], [7, 0], [5, 2], [6, 1], [4, 4], [7, 1]]
Constraints
1 <= people.length <= 20000 <= h <= 10^60 <= k < people.lengthThe input always describes a valid queue.