HashedIn by Deloitte interview question

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