0
The integers 1, 2, 3, 4 are pushed onto an initially empty stack in this order, and pops may be interleaved with the pushes at any time. Which of the following output sequences is impossible?
- A3 2 1 4
- B4 3 2 1
- C2 4 3 1
- D3 1 2 4
Correct answer: D
The integers 1, 2, 3, 4 are pushed onto an initially empty stack in this order, and pops may be interleaved with the pushes at any time. Which of the following output sequences is impossible?