mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-13 07:46:06 +00:00
build
This commit is contained in:
@@ -141,7 +141,10 @@ status: new
|
||||
|
||||
```typescript title="binary_search_insertion.ts"
|
||||
/* 二分查找插入点(无重复元素) */
|
||||
function binarySearchInsertionSimple(nums: Array<number>, target: number): number {
|
||||
function binarySearchInsertionSimple(
|
||||
nums: Array<number>,
|
||||
target: number
|
||||
): number {
|
||||
let i = 0,
|
||||
j = nums.length - 1; // 初始化双闭区间 [0, n-1]
|
||||
while (i <= j) {
|
||||
|
||||
Reference in New Issue
Block a user