(二)插入排序
void InsertSort(Sqlist &L){//對順序表L作直接插入排序
for(i=
if(LT(L
{//
L
L
for(j=i
L
}
}//InsertSort
void BinsertSort(SqList &L){//對順序表L作折半插入排序
for(i=
L
low=
while(low<=high){
m=(low+high)/
if(LT(L
high=m
else low=m+
}//while
for(j=i
L
L
}//for
}//BinsertSort
返回《數據結構》考研復習精編
[
From:http://tw.wingwit.com/Article/program/sjjg/201311/23817.html