Domanda di colloquio di Amazon

Implement a maximum stack, such that getting the maximum value of the stack takes O(1) time.