Deep Dive

Min Stack

155. Min Stack · Stacks & Queues · 25 of 78

1/7

getMin in O(1)

In this lessonStep 1 of 7 · ← → keys
The question

Design a stack with push, pop, top and getMin all in O(1).