.该算法的功能是判断链表L是否是非递减有序若是则返回true;否则返回falsepre指向当前结点p指向pre的后继
.q=p>next; p>next=q>next; free(q);
设单链表的头结点的头指针为head且pre=head;
while(pre>next!=p) pre=pre>next;
s>next=p; pre>next=s;
设单链表带头结点工作指针p初始化为p=H>next;
() while(p!=null && p>data!=X) p=p>next;
if(p= =null) return(null);∥查找失败
else return(p);∥查找成功
() while(p!=null && p>data<X ) p=p>next;
if(p==null || p>data>X) return(null);∥查找失败
else return(p);
() while(p!=null && p>data>X) p=p>next;
if(p==null || p>data<X) return(null); ∥查找失败
else return(p); ∥查找成功
本程序段功能是将pa和pb链表中的值相同的结点保留在pa链表中(pa中与pb中不同结点删除)pa是结果链表的头指针链表中结点值与从前逆序S记结果链表中结点个数(即pa与pb中相等的元素个数)S记原pa链表中删除的结点个数
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []