If a stack sequence is 1,2,3,4,5, the impossible output sequence is ()
A. 5,4,3,2,1
B. 4,5,3,2,1
C. 4,3,5,1,2
D. 1,2,3,4,5
Design an algorithm to determine whether the parentheses in the expression are paired, which data structure is the best?
A. Sequential list
B. Stack
C. Queue
D. Linked list