Skip to content

Commit 51f97b5

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent dbd7416 commit 51f97b5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

data_structures/stacks/min_const_time.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Given an set of numbers in a stack,
2+
Given an set of numbers in a stack,
33
find the minimum value from the stack at O(1)
44
55
Problem: https://leetcode.com/problems/min-stack/description/
@@ -15,7 +15,7 @@ def push(value: int) -> None:
1515
If the value to insert < minimum, then push to min stack
1616
Returns None
1717
18-
>>>
18+
>>>
1919
"""
2020
if len(stack) == 0:
2121
min_stack.append(value)
@@ -29,13 +29,13 @@ def push(value: int) -> None:
2929

3030
def pop() -> None:
3131
"""
32-
Pop from the stack.
32+
Pop from the stack.
3333
If the popped value is the same as the min stack top,
3434
pop from the min stack as well
3535
3636
Returns None
3737
38-
>>>
38+
>>>
3939
"""
4040
if len(stack) == 0:
4141
print("Nothing on stack")
@@ -48,7 +48,7 @@ def pop() -> None:
4848

4949
def get_min() -> int:
5050
"""
51-
Return the minimum element of the main stack by
51+
Return the minimum element of the main stack by
5252
returning the top of the minimum stack
5353
5454
Returns the minium element (int)

0 commit comments

Comments
 (0)