算法如下
LinkList merge_LinkList (LinkList A LinkList B)
{ /*设AB均为带头结点的单链表A和B归并成C返回C*/
LinkList C;
LinkList pqrs;
p=A>next;
q=B>next;
C=A; /*借助A表的头结点构造空C表*/
C>next=NULL;
r=C;
free(B); /*释放B表的头结点*/
while (p&&q)
{ if (p>datadata)
{
s=p;
p=p>next;
}
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []