Stack A has entries a, b, c (in that order with a on top), while Stack B is initially empty. When an entry is popped out of stack A, it can be printed immediately or pushed to stack B. When an entry is popped out of stack B, it can only be printed. Which of the following permutations of a, b, c is not possible to print?

c a b
  • b a c
  • b c a
  • a b c

We can manage to get "c" to print first.

But to do so requires putting "a" and then "b" into stack B.

Which then means that they must come out of B and be printed in reverse order.