Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0ab6e24

Browse files
修复 0704 二分查找 js版本代码无高亮样式问题
1 parent a6a0bc5 commit 0ab6e24

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

‎problems/0704.二分查找.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,9 @@ func search(nums []int, target int) int {
276276
```
277277

278278
**JavaScript:**
279+
(版本一)左闭右闭区间
279280

280281
```js
281-
282-
// (版本一)左闭右闭区间
283-
284282
/**
285283
* @param {number[]} nums
286284
* @param {number} target
@@ -302,9 +300,10 @@ var search = function(nums, target) {
302300
}
303301
return -1;
304302
};
303+
```
304+
(版本二)左闭右开区间
305305
306-
// (版本二)左闭右开区间
307-
306+
```js
308307
/**
309308
* @param {number[]} nums
310309
* @param {number} target
@@ -325,7 +324,6 @@ var search = function(nums, target) {
325324
}
326325
return -1;
327326
};
328-
329327
```
330328

331329
**Ruby:**

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /