Dsa
Stack
Easy
Daily Temperatures
Given a list of daily temperatures, return a list such that for each day, you tell how many days you have to wait until a warmer temperature. If there is no future day for which this is possible, put 0 instead.
Example Input:
3
1
2
3
Example Output:
1
1
0
Key concepts
stackarray
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now