Stack + Monotonic — Reasoning Check

Apply the module invariants, traces, and boundary conditions.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. What is the largest histogram rectangle area for heights [3,1,3,3]? Enter one integer.
2. Daily Temperatures processes [72,71,71,73]. Why must both 71 indices remain pending until 73 arrives?

Select one answer.

3. Evaluate postfix tokens ["9","4","-","2","/"], using integer division toward zero. Enter one integer.
4. A Min Stack stores one uncounted copy of each new minimum in a second stack. After Push(5), Push(2), Push(2), Pop(), GetMin returns 5. What information was lost?

Select one answer.

5. Evaluate 8-(3-(2-5)). Enter one integer.
6. A histogram implementation pops only when the incoming bar is STRICTLY lower and never performs a final flush. Which input exposes its missing work?

Select one answer.

Join Discord