Consider six stack operations: pushing and popping each of A, B, and C exactly…
Consider six stack operations: pushing and popping each of A, B, and C exactly once. The pushes must occur in the order push(A), then push(B), then push(C), although pops may be interleaved. For example, ACB can be a pop order via push(A), pop(A), push(B), push(C), pop(C), pop(B). Which of the following cannot be the pop order?
- A.
ABC
- B.
CBA
- C.
BAC
- D.
CAB
Attempted by 137 students.
Sign up free to check your answer
Sign up freeLoading lesson…

