← 返回 microsoft 的题目列表Daily Temperatures
类型:online_judge
Given an array T representing daily temperatures, return an array that answers how many days one has to wait until a warmer temperature. If there is no future day for which this is possible, put 0 in that position.
Example:
Input: T = [73, 74, 75, 71, 69, 72, 76, 73]
Output: [1, 1, 4, 2, 1, 1, 0, 0]
Constraints:
1 <= len(T) <= 10^5
30 <= T[i] <= 100
Complete the function and return the result array.
Example
Input
73 74 75 71 69 72 76 73