Update 0704.二分查找.md

This commit is contained in:
vanyongqi
2022-09-21 14:05:08 +08:00
committed by GitHub
parent 190f7901bb
commit 84e8f9c201

View File

@ -515,8 +515,8 @@ 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;
@ -542,8 +542,8 @@ int search(int* nums, int numsSize, int target){
return -1; return -1;
} }
``` ```
``` ```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;