Sollicitatievraag bij Purplle.com

How to implement queue using stack

Antwoord op sollicitatievraag

Anoniem

14 jul 2021

Takes 2 stacks , to enqueue directly push into stack and to dequeue empty complete stack and push into another stack then dequeue.