logo - 刷刷题
下载APP
【简答题】

已知P结点是某双向链表的中间结点,试从下列提供的语句中选出合适的语句序列,完成下面的操作。 1、 在P结点后插入S结点: 2、 在P结点前插入S结点: 3、删除P结点的直接后继结点: 4、删除P结点的直接前驱结点: 5、删除P结点: (1)P->next = P->next->next; (2)P->prior = P->prior->prior; (3)P->next = S; (4)P->prior = S; (5)S->next = P; (6)S->prior = P; (7)S->next = P->next; (8)S->prior = P->prior; (9)P->prior->next = P->next; (10)P->prior->next = P; (11)P->next->prior = P; (12)P->next->prior = S; (13)P->prior->next = S; (14)P->next->prior = P->prior; (15)Q = P->next; (16)Q = P->prior; (17) free(P); (18)free(Q);

举报
参考答案:
参考解析:
.
刷刷题刷刷变学霸
举一反三

【单选题】单项链表相比,双向链表的特点之一是(  )

A.
可以省略表头指针或表尾指针
B.
顺序访问相邻结点更灵活
C.
可以进行随机访问
D.
插入、删除操作更简单

【单选题】在单链表中,删除p所指结点的直接后继的操作是_____。

A.
p一>next=p一>next一>next;
B.
p=p一>next;p一>next=p一>next一>next;
C.
p一>next=p一>next:;
D.
p=p一>next一>next;