分析下面算法功能,以及时间复杂度。
#defineList_Size100
typedefstruct {
ElemType elem[List_Size];
int length;
}SqList;
voidex(SqListla,SqListlb,SqList&lc) {
i=0; j=0; k=0;
while(i<la.length&&j<lb.length) {
if(la.elem[i]<=lb.elem[j]) lc.elem[k++]=la.elem[i++];
else lc.elem[k++]=lb.elem[j++];
}
while(i<la.length) lc.elem[k++]=la.elem[i++];
while(j<lb.length) lc.elem[k++]=lb.elem[j++];
}//ex