← Stack & Queue Quiz: all 8 questions
Stack & Queue Quiz · Question 6 of 8
For "Daily Temperatures" (next warmer day), the monotonic stack keeps temperatures…
For "Daily Temperatures" (next warmer day), the monotonic stack keeps temperatures…
- A.Decreasing from bottom to top
- B.Increasing from bottom to top
- C.Sorted after every push
- D.Random
Answer & explanation
Correct answer: Decreasing from bottom to top
Colder days wait on the stack; a warmer day pops and resolves all colder days above it.
Can you get the rest right without peeking?
Take the timed Stack & Queue Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →