Given an array of daily temperatures, return an array where answer[i] is the number of days until a warmer temperature. If no warmer day exists, put 0.
With [73, 74, 75, 71, 69, 72, 76, 73]:
- Day 0 (73°): Day 1 is warmer. Wait
1day. - Day 1 (74°): Day 2 is warmer. Wait
1day. - Day 2 (75°): Day 6 is warmer. Wait
4days. - Day 6 (76°): No warmer day. Answer:
0.
Result: [1, 1, 4, 2, 1, 1, 0, 0].
Constraints: length . Temperatures to .