Stack Overflow Then Queue: Which Elements Are Dequeued

Company: Qualcomm IISc

Difficulty: medium