Choose the correct alternatives (more than one may be correct) and write the…
GATE · 1991 · CS · Question 3 subparts
Choose the correct alternatives (more than one may be correct) and write the corresponding letters only. 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?
- A.
20, 10, 20, 10, 20
- B.
20, 20, 10, 10, 20
- C.
10, 20, 20, 10, 20
- D.
20, 20, 10, 20, 10
Attempted by 670 students.
Show answer
Correct answer: B
The worked solution is available to enrolled students.
Video solution available to enrolled students.
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…