Update binary_search.md

Edited number out of bound topic
This commit is contained in:
Slone
2022-12-05 19:14:50 +08:00
committed by GitHub
parent b580b29b66
commit 75ffa5180e

View File

@@ -328,7 +328,10 @@ $$
=== "Go"
```go title=""
// (i + j) 有可能超出 int 的取值范围
m := (i + j) / 2
// 更换为此写法则不会越界
m := i + (j - i) / 2
```
=== "JavaScript"