ISRO CS-2023
January 24, 2024
GATE 1995
January 24, 2024
ISRO CS-2023
January 24, 2024
GATE 1995
January 24, 2024

Question 11632 – Queues-and-Stacks

The following sequence of operations is performed on a stack:

PUSH ( 10 ). PUSH ( 20 ). POP. PUSH ( 10 ). PUSH ( 20 ). POP.  POP. POP. PUSH ( 20 ). POP 

The sequence of values popped out is

Correct Answer: B

Question 8 Explanation: 
⇒ Push(10)

⇒ Push(20)

⇒ Pop 20

⇒ Push(10)

⇒ Push(20)

⇒ Pop 20

⇒ Pop 10

⇒ Pop 10

⇒ Push(20)

⇒ Pop 20

A
20, 10, 20, 10, 20
B
20, 20, 10, 10, 20
C
10, 20, 20, 10, 20
D
20, 20, 10, 20, 10
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!