https://leetcode.com/problems/daily-temperatures
739. Daily Temperatures
给一串每日温度,回传每日需等待几天才会有更温暖的温度
如果后面没有更温暖的日子就回传0
Example 1:
Input: temperatures = [73,74,75,71,69,72,76,73]
Output: [1,1,4,2,1,1,0,0]
Example 2:
Input: temperatures = [30,40,50,60]
Output: [1,1,1,0]
Example 3:
Input: temperatures = [30,60,90]
Output: [1,1,0]
Python3 code: