mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 06:07:20 +08:00 
			
		
		
		
	Update binary_search.md
Edited number out of bound topic
This commit is contained in:
		@ -328,7 +328,10 @@ $$
 | 
				
			|||||||
=== "Go"
 | 
					=== "Go"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ```go title=""
 | 
					    ```go title=""
 | 
				
			||||||
 | 
					    // (i + j) 有可能超出 int 的取值范围
 | 
				
			||||||
 | 
					    m := (i + j) / 2
 | 
				
			||||||
 | 
					    // 更换为此写法则不会越界
 | 
				
			||||||
 | 
					    m := i + (j - i) / 2
 | 
				
			||||||
    ```
 | 
					    ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
=== "JavaScript"
 | 
					=== "JavaScript"
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user