{//二路插入排序的算法
int d[n+
d[
for(i=
{ if(R[i]
{ low=
while (low<=high) //折半查找插入位置
{ m=(low+high)/
if(R[i]
}//while
for (j=final;j>=high+
d[high+
}
else //插入前部
{ if(first==
else{ low=first;high=n;
while (low<=high)
{ m=(low+high)/
if(R[i]
}//while
for (j=first;j<=high;j++) d[j
d[high]=R[i]; first
}//if
}//if
}//for
R[
for(i=first%n+
}//BiInsertSort
[
From:http://tw.wingwit.com/Article/program/sjjg/201311/23166.html