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 8df1b4b

Browse files
Update 0739.每日温度.md
1 parent 98458cd commit 8df1b4b

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
@@ -192,7 +192,7 @@ class Solution {
192192
否则的话,可以直接入栈。
193193
注意,单调栈里 加入的元素是 下标。
194194
*/
195-
Stack<Integer>stack=new Stack<>();
195+
Deque<Integer>stack=new LinkedList<>();
196196
stack.push(0);
197197
for(int i=1;i<lens;i++){
198198

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

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

0 commit comments

Comments
(0)

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