File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
- Given an set of numbers in a stack, find the minimum value from the stack at O(1)
2
+ Given an set of numbers in a stack,
3
+ find the minimum value from the stack at O(1)
3
4
4
5
Problem: https://leetcode.com/problems/min-stack/description/
5
6
"""
@@ -26,7 +27,8 @@ def push(value: int):
26
27
27
28
def pop ():
28
29
"""
29
- Pop from the stack. If the popped value is the same as the min stack top,
30
+ Pop from the stack.
31
+ If the popped value is the same as the min stack top,
30
32
pop from the min stack as well
31
33
32
34
Returns None
@@ -42,7 +44,8 @@ def pop():
42
44
43
45
def get_min ():
44
46
"""
45
- Return the minimum element of the main stack by returning the top of the minimum stack
47
+ Return the minimum element of the main stack by
48
+ returning the top of the minimum stack
46
49
47
50
Returns the minium element (int)
48
51
You can’t perform that action at this time.
0 commit comments