Question d’entretien chez Qualcomm

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