How would you design a stack which, in addition to the traditional push and pop operations, also supports an operation called min
which returns the element having the minimum value in the stack? push, pop, and min
should all operate in O(1) time.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here