Quiz
Question 1 of 4. 0 correct, 0 incorrect.
For each value in 2 7 3 5 4 6, the next greater value to its right, or −1 if there is none, is ____. Write the six answers separated by spaces.
Hint
Keep the positions still waiting on a stack, and let each new value pop every smaller one on top.