Hey,
For the example:
[[7,0],[4,4],[7,1],[5,0],[6,1],[5,2]]
is
[[7,0],[5,0],[6,1],[7,1],[5,2],[4,4]]
not a valid Queue order? It seems to follow all the rules and restrictions, unless I'm missing something.
Thanks
@fsi206914 Can you explain why [4, 4]
disobeys the rule?
To quote the problem: k is the number of people in front of this person who have a height greater than or equal to h
. In the above example k = 4; h = 4
and there are 5 people ahead of [4, 4]
with heights greater than or equal to 4. Since 5 > 4 the requirement is satisfied.