单选题:Given a finite set of elements S. The sequences `in` and `out`
Given a finite set of elements S. The sequences in and out are permutations of S. Start from an empty stack ST, which of the following statements are TRUE?
A.If in is the pushing sequence of ST, then it cannot be determined if out is a possible popping sequence.
B.If out is the popping sequence of ST, then it cannot be determined if in is a possible pushing sequence.
C.If in is the pushing sequence and out is a correspongding popping sequence of ST, then in and out must be different.
D.If in is the pushing sequence and out is a correspongding popping sequence of ST, then in and out might be in reversed order.
答案:D
A.If in is the pushing sequence of ST, then it cannot be determined if out is a possible popping sequence.
B.If out is the popping sequence of ST, then it cannot be determined if in is a possible pushing sequence.
C.If in is the pushing sequence and out is a correspongding popping sequence of ST, then in and out must be different.
D.If in is the pushing sequence and out is a correspongding popping sequence of ST, then in and out might be in reversed order.
答案:D