设双向循环链表中结点的结构为(data, prior, next)。若想在指针p所指结点之后插入指针s所指结点,则应执行下列哪一个操作?
设双向循环链表中结点的结构为(data, prior, next)。若想在指针p所指结点之后插入指针s所指结点,则应执行下列哪一个操作?
A.p->next=s;p->next->prior=s;s->prior=p;s->next=p->next
B.s->prior=p;s->next=p->next;p->next=s;p->next->prior=s
C.s->prior=p;s->next=p->next;p->next->prior=s;p->next=s
D.p->next=s;s->prior=p;p->next->prior=s;s->next=p->next
正确答案:s->prior=p;s->next=p->next;p->next->prior=s;p->next=s