Skip to content

Commit cd0fffa

Browse files
committed
fix: update some code
1 parent 867dc16 commit cd0fffa

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

leetcode刷题/note/No155_min-stack.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ js直接使用数组实现栈,最小值通过遍历查找,代码如下:
3131
*/
3232
var MinStack = function() {
3333
this.stack = [];
34-
this.min = 0;
3534
};
3635

3736
/**
3837
* @param {number} x
3938
* @return {void}
4039
*/
4140
MinStack.prototype.push = function(x) {
42-
if (this.stack[this.stack.length - 1] )
4341
this.stack.push(x);
4442
};
4543

0 commit comments

Comments
 (0)