Question d’entretien chez Netezza

Implement a queue with two stacks.

Réponse à la question d'entretien

Utilisateur anonyme

28 oct. 2010

Enqueue into stack 1. Dequeue by popping all elements into stack 2 first, then pop off expected element from stack 2, and pop all elements from stack 2 into stack 1.