你可能感兴趣的试题
p^.next:=head*.next;head^.next:=p p^.next:=head^.next;head:=p p*.next:=head;head:=p head*.next:=head; p:=head
s↑.link=p↑.link; p↑.link:=s q↑.link;=s; s↑.link:=p p↑:link:=s↑.link; s↑.link=p p↑.link=s; s↑.link:=q
s↑.link:=p↑.link;p↑.link:=s q↑.link:=s;s↑.link:=p p↑.link:=s↑.link;s↑.link:=p p↑.link:=s;s↑.link:=q
p:=p^.next q:=p^.next;p^.next:=q^.next p^.next:=q;q^.next:=p p:=q^.next;q^.next=p
q:=p↑.link;p↑.link:=q↑.link p↑.link:=q↑.link;q↑link:=p↑.link q↑.link:=p;p↑.link:=q q↑.link:=P↑.link;p↑,link:=q
s→right指向的节点一定是s所指节点的直接后继节点 s→left指向的节点一定是s所指节点的直接前驱节点 从s所指节点出发的right链可能构成环 s所指节点的left和right指针一定指向不同的节点
q↑.link:=p↑.link;p↑.link:=q; q:=p↑.link;p↑.link:=q↑.link; q↑.link:=p;p↑.link:=q; q:=p↑.link;p:=q↑.link;
p↑.rlink↑.llink: =q; p↑.rlink: =q; q↑.llink: =p; q↑.rlink: =p↑.rlink; p↑.llink↑.rlink: =q; p↑.llink: =q; q↑.rlink: =p; q↑.llink: =p↑.llink; q↑.llink: =p; q↑.rlink: =p↑.rlink; p↑.rlink↑.llink: =q; p↑.rlink: =q↑; q↑.rlink: =p; q↑.llink: =p↑.llink; p↑.llink↑.rlink: =q; p↑.llink: =q;
s↑.link:=p↑.link;p↑.link:=s q↑.link:=s;s↑.link:=p p↑.link:=s↑.link;s↑.link:=p p↑.link:=s;s↑.link:=q
p↑.rlink↑.llink:=q;p↑.rlink:=q;q↑.llink:=p;q↑.rlink:=p↑,rlink; p↑.llink↑.rlink:=q;p↑.llink:=q;q↑.rlink:=p;q↑.llink:=p↑.llink; q↑.llink:=p;q↑.rlink:=p↑.rlink;p↑.rlink↑.llink:=q;p↑.rlink:=q↑; q↑.rlink:=p;q↑.llink:=p↑.llink;p↑.1link↑.rlink:=q;p↑.llink:=q;
q:=p↑.link;p↑.link:=q↑.link p↑.link:=q↑.link;q↑.link:=p↑.link q↑.link:=p;p↑.link:=q q↑.linkl:=p↑.link;p↑.link:=q
q↑.link:=p↑.link;p↑link:=q; q:=p↑.link;p↑.link:=q↑.link; q↑.link:=P;p↑.link:=q; q:=P↑.link;p:=q↑.link;
p->next=q->next; p->next=P->next->next; p->next=r; p=q->next;
若在头节点中存入链表长度值,则求链表长度运算的时间复杂度为O(1) 在链表的任何一个元素前后进行插入和删除操作可用一致的方式进行处理 加入头节点后,代表链表的头指针不因为链表为空而改变 加入头节点后,在链表中进行查找运算的时间复杂度为O(1)
q↑.link: =p↑.link; p↑.link: =q; q: =p↑.link; p↑.link:=q↑.link; q↑.link: =p; p↑.link: =q; q:=p↑.link; p:=q↑.link;
s↑.link:=p↑.link;p↑.link:=s q↑.link:=s;s↑.link:=p p↑.link:=s↑.link;s↑.link:=p p↑.link:=s;s↑.link:=q
q:=p↑.link; p↑.link:=q↑.link p↑.link=q↑.link; q↑.link:=p↑.link q↑.link=p; p↑.link=q q↑.link:=p↑.link; p↑.link:=q
q:=p↑.link;p↑.link:=q↑.link p↑.link:=q↑.link;q↑.link:=p↑.link q↑.link:=p;p↑.link:=q q↑.link:=p↑.link;p↑.link:=q
q->next=r->next;p->next=r;r->next=q; p->next=r;q->next=r->next;r->next=q; q->next=r->next;r->next=q;p->next=r; r->next=q;p->next=r;q->next=r->next;
q:=p↑.link; p↑.link:=q↑.link p↑.link:=q↑.link; q↑.link:=p↑.link q↑.link:=p; p↑.link:=q q↑.link:=p↑.link; p↑.link:=q