Domanda di colloquio di Qualcomm

Implement queue using two stack. How to design a system to avoid deadlock.