1 vote

If we have six stack operationspushing and popping each of $A, B$ and $C$-such that push $(A)$ must occur before push $(B)$ which must occur before push $(C)$, then $A, C, B$ is a possible order for the pop operations, since this could be our sequence : push $(A)$, pop $(A)$, push $(B)$, push $(C)$, pop $(C)$, pop $(B)$. Which one of the following orders could not be the order the pop operations are run, if we are to satisfy the requirements described above?

- $ABC$
- $CBA$
- $BAC$
- $CAB$

1 vote

As question says, push (A) (A) must occur before push (B) (B)which must occur before push (C)

So option a is valid as

first push A than pop A

Than push B again pop B

Than push C again pop c

So here ABC is valid pop sequence

(B)option

Push A

Push B

Push C

Pop all we will get CBA sequence so its valid

Option (c)

Push A

Push B now pop B than again pop C now push C now pop C

So BCA is valid sequence

(D) option is not valid

So( d) option answer

So option a is valid as

first push A than pop A

Than push B again pop B

Than push C again pop c

So here ABC is valid pop sequence

(B)option

Push A

Push B

Push C

Pop all we will get CBA sequence so its valid

Option (c)

Push A

Push B now pop B than again pop C now push C now pop C

So BCA is valid sequence

(D) option is not valid

So( d) option answer