mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 12:16:14 -04:00
Update and rename stack_II.py to stack.py
This commit is contained in:
parent
27bc931a53
commit
6ed5cb896b
@ -22,17 +22,10 @@ class Stack:
|
||||
self.min = prior_min
|
||||
return val
|
||||
|
||||
return False
|
||||
|
||||
def top(self) -> int:
|
||||
if self.stack:
|
||||
return self.stack[-1][0]
|
||||
|
||||
return False
|
||||
|
||||
def get_min(self) -> int:
|
||||
if self.stack:
|
||||
return self.min
|
||||
return self.min
|
||||
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user