Checkpoint8 min

Stack Checkpoint

Monotonic stack invariants, when to pop, and recognizing next-greater phrasing.

Question 1 of 7

You push 3, then 8, then 5 onto an empty stack, then pop twice. What is on top now?