直接把hb的头部连在ha的尾部就可以了.
typedef struct ListNode{
int data;
ListNode *next;
}ListNode,*List;
List Merge_List( List ha ,List hb ){
List tail = ha;
if( !ha || !hb || !hb->next || ha->next ) //有一个链表为空
return (ha || ha->next)?ha:hb;
while( tail->next )
tail = tail->next;
tail->next = hb->next;
tail = hb->next;
while( tail->next )
tail = tail->next;
tail->next = ha;
free(hb);
hb = NULL;
return ha;
}