Interview
Stack and Queue problems - underrated topic for interviews
8/7/2025
00
I used to skip stack/queue problems thinking they're too easy. Big mistake. Here are non-trivial ones I've seen in actual interviews:
- Next greater element (monotonic stack)
- Largest rectangle in histogram
- Trapping rain water
- Min stack
- Evaluate reverse polish notation
- Daily temperatures
- Valid parentheses (and its harder variants)
- Sliding window maximum (deque)
The monotonic stack pattern alone has come up in 3 of my interviews this year. Don't sleep on stacks!
stackqueuepatternsinterview-prep