Pregunta de entrevista de Amazon

Implement a stack data structure with O(1) push, pop and access to the largest element.

Respuesta de la entrevista

Anónimo

2 abr 2014

I used two queues, one for the stack and one to hold largest elements.