void Reverse_merge(pLinkList la,pLinkList lb,struct LinkList ** lc)
{
pLinkList current = NULL;
while ( la && lb )
{
if ( la->value < lb->value )
{
*lc = la;
la = la->next;
(*lc)->next = current;
current = *lc;
}
else
{
*lc = lb;
lb = lb->next;
(*lc)->next = current;
current = *lc;
}
}
while (la)
{
*lc = la;
la = la->next;
(*lc)->next = current;
current = *lc;
}
while (lb)
{
*lc = lb;
lb = lb->next;
(*lc)->next = current;
current = *lc;
}
}
类似于归并排序中的一种合并方法
转载于:https://www.cnblogs.com/helbhu/archive/2007/12/17/1002811.html