HashedIn by Deloitte Interview Question

Implement a stack which keeps pops the max element in constant time.