Frage im Vorstellungsgespräch bei Microsoft

Implement a stack with two queues

Antwort im Vorstellungsgespräch

Anonym

8. Dez. 2018

Just have a queue for popping and another one for pushing, if the queue for popping is empty then just move everything from the pushing queue to the popping queue.