ISRO 2008 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0182

Stack A has the entries a, b, c (with a on top). Stack B is empty. An entry popped out of stack A can be printed immediately or pushed to stack B. An entry popped out of the stack B can be only be printed. In this arrangement, which of the following permutations of a, b, c are not possible?
  1. A
    b a c
  2. B
    b c a
  3. C
    c a b
  4. D
    a b c

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionOfficial GATE Answer Key: Option C.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/50138/isro2008-70

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com