Skip to content

Commit 23b45d0

Browse files
committed
shortened length
1 parent f0fdd26 commit 23b45d0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

data_structures/stacks/min_constant_time.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
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)
34
45
Problem: https://leetcode.com/problems/min-stack/description/
56
"""
@@ -26,7 +27,8 @@ def push(value: int):
2627

2728
def pop():
2829
"""
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,
3032
pop from the min stack as well
3133
3234
Returns None
@@ -42,7 +44,8 @@ def pop():
4244

4345
def get_min():
4446
"""
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
4649
4750
Returns the minium element (int)
4851

0 commit comments

Comments
 (0)