Class Solution
java.lang.Object
g0701_0800.s0739_daily_temperatures.Solution
739 - Daily Temperatures.<p>Medium</p>
<p>Given an array of integers <code>temperatures</code> represents the daily temperatures, return <em>an array</em> <code>answer</code> <em>such that</em> <code>answer[i]</code> <em>is the number of days you have to wait after the</em> <code>i<sup>th</sup></code> <em>day to get a warmer temperature</em>. If there is no future day for which this is possible, keep <code>answer[i] == 0</code> instead.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> temperatures = [73,74,75,71,69,72,76,73]</p>
<p><strong>Output:</strong> [1,1,4,2,1,1,0,0]</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> temperatures = [30,40,50,60]</p>
<p><strong>Output:</strong> [1,1,1,0]</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> temperatures = [30,60,90]</p>
<p><strong>Output:</strong> [1,1,0]</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= temperatures.length <= 10<sup>5</sup></code></li>
<li><code>30 <= temperatures[i] <= 100</code></li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
dailyTemperatures
public int[] dailyTemperatures(int[] temperatures)
-