Pergunta de entrevista da empresa Amazon

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