設指針q指向單鏈表中結點A,指針p指向單鏈表中結點A的後繼結點B,指針s指向被插入的結點X,則在結點A和結點B間插入結點X的操作序列為()。
A.p->;next=s;s->;next=q
B.q->;next=s;s->;next=p
C.p->;next=s->;next;s->;next=p
D.s->;next=p->;next;p->;next=-s
正確答案:q->;next=s;s->;next=p
設指針q指向單鏈表中結點A,指針p指向單鏈表中結點A的後繼結點B,指針s指向被插入的結點X,則在結點A和結點B間插入結點X的操作序列為()。
A.p->;next=s;s->;next=q
B.q->;next=s;s->;next=p
C.p->;next=s->;next;s->;next=p
D.s->;next=p->;next;p->;next=-s
正確答案:q->;next=s;s->;next=p