🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Monotonic Stack: all 13 questions

Quiz: Monotonic Stack · Question 6 of 13

What does dailytemperatures([30, 40, 50, 60]) return?

What does daily_temperatures([30, 40, 50, 60]) return?

  1. A.[0, 0, 0, 0]
  2. B.[1, 1, 1, 0]
  3. C.[3, 2, 1, 0]
  4. D.[1, 2, 3, 0]
Answer & explanation

Correct answer: [1, 1, 1, 0]

Every day is followed by a warmer one immediately, except the last.

Can you get the rest right without peeking?

Take the timed Quiz: Monotonic Stack quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →