LeetCode
Queue Reconstruction by Height
Click
here
for an explanation.