()本题与上面两题类似要求结果指针为lc其核心语句段如下
pa=la>next;pb=hb>next;
lc=(LinkedList )malloc(sizeof(LNode));
pc=lc;∥pc是结果链表中当前结点的前驱
while(pa&&pb)
if(pa>data<pb>data)
{pc>next=pa;pc=pa;pa=pa>next;}
else {pc>next=pb;pc=pb;pb=pb>next;}
if(pa)pc>next=pa; else pc>next=pb;
free(la);free(lb);∥释放原来两链表的头结点
算法时间复杂度为O(m+n)其中m和n分别为链表la和lb的长度
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []