Min Stack at Snapchat

Medium57.7% acceptance

This problem has 87.5% frequency at Snapchat.

Problem Description

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 the element `val` onto the stack. * `void pop()` removes the element on the top of the...

Read full problem and hints

Topics

Also asked at 35 companies


More Snapchat Questions

View all Snapchat questions