Suppose q and p are pointers in singly linked list, q is predecessor of p, if we want to insert s node between q and p, we should execute ( )
A. s->next=p->next; p->next=s;
B. p->next=s->next; s->next=p;
C. q->next=s; s->next=p;
D. p->next=s; s->next=q;
查看答案
The postfix expression of a * ( b + c ) - d is ( )
A. a*bc+d-
B. abcd*+-
C. bc+d-a*
D. abc+*d-
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