Day 8 of LeetCode
Documenting LeetCode solving.
Q1
155. Min Stack
Medium. Stack
Use two stacks. The minStack is to track current minimum number.
class MinStack:
def __init__(self):
self.stack = []
self.minStack = []
def push(self, val: int) -...
evelynsjourney.hashnode.dev2 min read