Question
【问题描述】
编制一个能演示将两个有序表合并为一个有序表的程序。
【基本要求】
已知递增有序线性表LA和LB,现将LA和LB合并到LC,LC也是递增有序的。...【测试数据】
LA=(3,5,8,11) LB=(2,6,8,9,11,15,20)
合并后的LC=(2,3,5,6,8,9,11,15,20)
#include
#include<...L;
}
int main(void){
int a[100],b[100];
char temp;
int countA=0,countB=0;
printf("请输入第一个递增有序线性表...='\n'){
countA++;
}
printf("请输入第二个递增有序线性表: ");
while(scanf("%d%c",&b[countB],&temp),temp!...L1=createList(a,countA);
List L2=createList(b,countB);
List L = mergeList(L1,L2);
printf("合并后的线性表为