合并顺序表问题 求指导
运行结果为顺序表为空什么原因 自己看不出来
谢谢各位大佬了!!
int main(void)
{
int value = 0;
SqList L;
init_SqList(&L, 6);
SqList L1;
init_SqList(&L1, 6);
SqList L2;
init_SqList(&L2, 20);
append_SqList(&L, 1);
append_SqList(&L, 3);
append_SqList(&L, 3);
append_SqList(&L, 4);
append_SqList(&L, 7);
append_SqList(&L1, 2);
append_SqList(&L1, 4);
append_SqList(&L1, 5);
append_SqList(&L1, 8);
append_SqList(&L1, 9);
comb_SqList(L, L1, &L2);
show_SqList(&L2);
return 0;
}
void comb_SqList(SqList L, SqList L1, SqList * L2)
{
int k = 0;
for (int i = 0; i < i++)
{
for (int j = 0; j < j++)
{
if (L.data[i] < L1.data[j])
{
L2->data[k] = L.data[i];
k++;
}
else
{
L2->data[k] = L1.data[j];
k++;
}
}
}
return ;
}