day3, 2021年 12 月 19 日,周日

题目

在循环双链表的 p 所指的结点之前插入 s 所指结点的操作是__

  1. p->prior = s;s->next = p;p->prior->next = s;s->prior = p->prior
  2. p->prior = s;p->prior->next = s;s->next = p;s->prior = p->prior
  3. s->next = p;s->prior = p->prior;p->prior = s;p->prior->next = s
  4. s->next = p;s->prior = p->prior;p->prior->next = s;p->prior = s

答案

选择 4.

day3. 双向链表的插入 - 图1