Domanda di colloquio di Amazon

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

Risposta di colloquio

Anonimo

2 apr 2014

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