min stack
LeetCode / Design / 155번 / Min Stack / JS
Min Stack - LeetCode Can you solve this real interview question? Min Stack - Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: * MinStack() initializes the stack object. * void push(int val) pushes t leetcode.com stack의 메소드들을 구현하는데 추가로 getMin()을 구현한다. getMin()은 스택의 값중에서 가장 작은값을 반환한다. 그 외 기본 메소드는..