在双向链表指针p的结点前插入一个指针q的结点操作是()
在双向链表指针p的结点前插入一个指针q的结点操作是()
A.p->prior=q;q->next=p;p->prior->next=q;q->prior=q;
B.p->prior=q;p->prior->next=q;q->next=p;q->prior=p->prior
C.q->next=p;q->prior=p->prior;p->prior->next=q;p->prior=q;
D.q->prior=p->prior;q->next=q;p->prior=q;p->prior=q;
正确答案:q->next=p;q->prior=p->prior;p->prior->next=q;p->prior=q;