← 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?
- A.[0, 0, 0, 0]
- B.[1, 1, 1, 0]
- C.[3, 2, 1, 0]
- 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 →