1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-02-10 05:45:25 +08:00

feat: update

This commit is contained in:
喜欢芝士的妹妹
2023-08-30 23:08:37 +08:00
parent 6d81d1706a
commit f989110774
3 changed files with 6 additions and 17 deletions

View File

@@ -8,7 +8,6 @@ void BinaryInsertSort(ElemType Arr[],int n){
lowIndex=1; // 左侧子表 折半查找起始位置
highIndex=i-1; // 左侧子表 折半查找结束位置
while(lowIndex<=highIndex){
// 左侧有序子表的中间位置角标
@@ -23,7 +22,8 @@ void BinaryInsertSort(ElemType Arr[],int n){
}
}
// 跳出循环需要lowIndex>heightIndex说明待插入位置的角标在heightIndex之后为 heightIndex+1,此时需要将heightIndexi之间的所有元素后移
// 跳出循环需要lowIndex>heightIndex
// 说明待插入位置的角标在heightIndex之后为 heightIndex+1,此时需要将heightIndexi之间的所有元素后移
for(j=i-1;j>highIndex;--j){
Arr[j+1]=Arr[j]