diff --git a/problems/0704.二分查找.md b/problems/0704.二分查找.md index 46f529db..590ec1b1 100644 --- a/problems/0704.二分查找.md +++ b/problems/0704.二分查找.md @@ -484,6 +484,7 @@ func search(nums: [Int], target: Int) -> Int { (版本一)左闭右开区间 ```rust +use std::cmp::Ordering; impl Solution { pub fn search(nums: Vec, target: i32) -> i32 { let (mut left, mut right) = (0, nums.len()); @@ -503,6 +504,7 @@ impl Solution { //(版本二)左闭右闭区间 ```rust +use std::cmp::Ordering; impl Solution { pub fn search(nums: Vec, target: i32) -> i32 { let (mut left, mut right) = (0, nums.len());