🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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…

  1. A.Decreasing from bottom to top
  2. B.Increasing from bottom to top
  3. C.Sorted after every push
  4. 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 →