Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 49a5d83

Browse files
Merge pull request youngyangyang04#1340 from huangyebiaoke/master
Update 0739.每日温度.md
2 parents c53082e + 8df1b4b commit 49a5d83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎problems/0739.每日温度.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class Solution {
193193
否则的话,可以直接入栈。
194194
注意,单调栈里 加入的元素是 下标。
195195
*/
196-
Stack<Integer>stack=new Stack<>();
196+
Deque<Integer>stack=new LinkedList<>();
197197
stack.push(0);
198198
for(int i=1;i<lens;i++){
199199

@@ -217,7 +217,7 @@ class Solution {
217217
public int[] dailyTemperatures(int[] temperatures) {
218218
int lens=temperatures.length;
219219
int []res=new int[lens];
220-
Stack<Integer>stack=new Stack<>();
220+
Deque<Integer>stack=new LinkedList<>();
221221
for(int i=0;i<lens;i++){
222222

223223
while(!stack.isEmpty()&&temperatures[i]>temperatures[stack.peek()]){

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /