步骤:
- p保存Ta表头结点防止丢失
- Tb表头接到Ta表尾
- 释放Tb表头结点
- 修改指针
LinkList Connect(LinkList Ta, LinkList Tb)
{
LNode* p;
p = Ta->next;
Ta->next = Tb->next->next;
delete Tb->next;
return Tb;
}
步骤:
LinkList Connect(LinkList Ta, LinkList Tb)
{
LNode* p;
p = Ta->next;
Ta->next = Tb->next->next;
delete Tb->next;
return Tb;
}