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
For any non-empty binary tree T, if the number of leaf nodes is 5, the number of nodes with degree 1 is 6,then the number of nodes of degree 2 is ( )
A. 4
B. 5
C. 6
D. 7
The depth of a complete binary tree with 2000 nodes is ().
A. 9
B. 10
C. 11
D. 12
How many edges does the minimum spanning tree of a connected graph G with n vertices have?
A. n-1
B. n
C. n+1
D. Uncertain