739. Daily Temperatures
Practice Daily Temperatures for free on NudgeCode: Medium, Stack pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.
temperatures[i] is the temperature on day i. For each day, return how many days you have to wait until a strictly warmer day. If no warmer day comes later, use 0.
Example
temperatures = [73,74,75,71,69,72,76,73] -> [1,1,4,2,1,1,0,0]
Constraints
- 1 <= temperatures.length <= 10^5
- 30 <= temperatures[i] <= 100