Re: [闲聊] 每日LeetCode

楼主: JerryChungYC (JerryChung)   2024-01-31 13:39:00
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:
作者: JIWP (JIWP)   2024-01-31 13:45:00
大师
作者: SecondRun (雨夜琴声)   2024-01-31 14:04:00
大师

Links booklink

Contact Us: admin [ a t ] ucptt.com