在一个双链表中,在*p节点之后插入节点*q的操作是()。


在一个双链表中,在*p节点之后插入节点*q的操作是()。

A.q->prior = p;p-> next=q;p -> next -> prior =q; q ->next = p -> next;

B.q ->next = p -> next;p -> next -> prior =q;p-> next=q;q->prior = p;

C.p-> next=q;q->prior = p;q ->next = p -> next;p -> next -> prior =q;

D.p -> next -> prior =q;q->prior = p;p-> next=q;q ->next = p -> next;

正确答案:q ->next = p -> next;p -> next -> prior =q;p-> next=q;q->prior = p;


Tag:数据结构与算法 节点 操作 时间:2022-01-11 15:13:59