Question d’entretien chez Amazon

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