Update 0704.二分查找.md

This commit is contained in:
vanyongqi
2022-09-21 14:06:15 +08:00
committed by GitHub
parent 84e8f9c201
commit b9a26d4edf

View File

@ -516,7 +516,7 @@ impl Solution {
**C:** **C:**
```c ```c
## (版本一) 左闭右闭区间 [left, right] // (版本一) 左闭右闭区间 [left, right]
int search(int* nums, int numsSize, int target){ int search(int* nums, int numsSize, int target){
int left = 0; int left = 0;
int right = numsSize-1; int right = numsSize-1;
@ -543,7 +543,7 @@ int search(int* nums, int numsSize, int target){
} }
``` ```
```C ```C
##(版本二) 左闭右开区间 [left, right) // (版本二) 左闭右开区间 [left, right)
int search(int* nums, int numsSize, int target){ int search(int* nums, int numsSize, int target){
int length = numsSize; int length = numsSize;
int left = 0; int left = 0;