The Wayback Machine - https://web.archive.org/web/20251101111900/https://www.geeksforgeeks.org/questions/the-five-items-a-b-c-d-and-e-2/

ISRO | CS | 2009 | Data Structures | Stacks | Question 29

Last Updated :
Discuss
Comments

The five items: A, B, C, D, and E are pushed in a stack, one after other starting from A. The stack is popped four items and each element is inserted in a queue. The two elements are deleted from the queue and pushed back on the stack. Now one item is popped from the stack. The popped item is

A

B

C

D

Share your thoughts in the comments