Skip to content

Commit e3ce9e6

Browse files
authored
Update Min Stack - Leetcode 155.py
1 parent 2555991 commit e3ce9e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Min Stack - Leetcode 155.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ def top(self) -> int:
2020
return self.stk[-1]
2121

2222
def getMin(self) -> int:
23-
return self.min_stk[-1]
23+
return self.min_stk[-1]
24+
25+
# Time Complexity: O(1)
26+
# Space Complexity: O(n)

0 commit comments

Comments
 (0)