Domanda di colloquio di Mojio

Tell me how'd you implement a stack with just two queues.

Risposta di colloquio

Anonimo

2 ago 2019

I explained how one can do this, but also mentioned that it's generally a bad idea to implement a stack with two queues ;) I was a bit struck that the interviewer insisted on doing it with two queues as this is not an efficient implementation.