mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-04-14 02:09:56 +08:00
feat: 移除eslint相关配置,引入@antfu/eslint-config,统一约束风格
This commit is contained in:
@@ -20,7 +20,8 @@ function binaryInsertSort(arr, len) {
|
||||
if (arr[mid] <= temp) {
|
||||
// 右侧
|
||||
lowIndex = mid + 1
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// 左侧
|
||||
highIndex = mid - 1
|
||||
}
|
||||
@@ -35,10 +36,8 @@ function binaryInsertSort(arr, len) {
|
||||
return arr
|
||||
}
|
||||
|
||||
|
||||
// 测试用例
|
||||
const dealArr = [5, 2, 7, 3, 18, 8, 12, 1]
|
||||
console.log('插入排序前:', dealArr)
|
||||
const sortResult = binaryInsertSort(dealArr, 7)
|
||||
console.log('插入排序后:', sortResult)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user