Min Stack
MediumStack
The problem
Design a stack that also returns its minimum element in constant time.
Full statement, examples and constraints: see the original problem link below.
Design a stack that also returns its minimum element in constant time.
Full statement, examples and constraints: see the original problem link below.