在一个双链表中,在*p节点之后插入节点*q的操作是()。
1个回答
展开全部
在一个双链表中,在*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;
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;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询