Minimum Stack: Stack returning min element in O(1) time
Stack is a LIFO(Last-In-First-Out) list of elements where Push & Pop operations takes constant time, O(1). Design a Stack such that the operation of getminimum() (function returning minimum element of the stack) also takes constant time. Please note that it will only return the current minimum element from the stack and will not delete (pop) any […]