Design Part- 2 | Min Stack | LeetCode
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Check out Part-1 Before proceeding further.
Problem Statement :

LeetCode Problem Link : https://leetcode.com/problems/min-stack/
Class MinStack :

Operations : Push, Pop, getMin, top in Constant time.

Follow Rahul Goel on Medium for updates — @therahulgoel