Skip to content
Related Articles
Open in App
Not now

Related Articles

ISRO | ISRO CS 2015 | Question 11

Improve Article
Save Article
  • Last Updated : 03 Apr, 2018
Improve Article
Save Article

If the sequence of operations – push (1), push (2), pop, push (1), push (2), pop, pop, pop, push (2), pop are performed on a stack, the sequence of popped out values
(A) 2,2,1,1,2
(B) 2,2,1,2,2
(C) 2,1,2,2,1
(D) 2,1,2,2,2

Answer: (A)

Explanation: The pop sequence can be seen from the following table:

Option (A) is correct.

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!