What does the monotonic stack store?
Practice this question from Daily Temperatures - Monotonic stack Pattern Practice Quiz, with options and an explanation.
Question
What does the monotonic stack store?
Option A — Correct answer
Indices of unresolved days in decreasing temperature order
Option B
Only warmer temperatures
Option C
All answers immediately
Option D
Sorted day numbers
Explanation
It stores indices of unresolved days in decreasing temperature order.