mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
Update 0704.二分查找.md
This commit is contained in:
@ -515,8 +515,8 @@ impl Solution {
|
||||
```
|
||||
|
||||
**C:**
|
||||
```
|
||||
//C (版本一) 左闭右闭区间 [left, right]
|
||||
```c
|
||||
## (版本一) 左闭右闭区间 [left, right]
|
||||
int search(int* nums, int numsSize, int target){
|
||||
int left = 0;
|
||||
int right = numsSize-1;
|
||||
@ -542,8 +542,8 @@ int search(int* nums, int numsSize, int target){
|
||||
return -1;
|
||||
}
|
||||
```
|
||||
```
|
||||
C (版本二) 左闭右开区间 [left, right)
|
||||
```C
|
||||
##(版本二) 左闭右开区间 [left, right)
|
||||
int search(int* nums, int numsSize, int target){
|
||||
int length = numsSize;
|
||||
int left = 0;
|
||||
|
Reference in New Issue
Block a user