mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-07 15:45:40 +08:00
Apply suggestions from code review
This commit is contained in:
@ -484,6 +484,7 @@ func search(nums: [Int], target: Int) -> Int {
|
||||
(版本一)左闭右开区间
|
||||
|
||||
```rust
|
||||
use std::cmp::Ordering;
|
||||
impl Solution {
|
||||
pub fn search(nums: Vec<i32>, 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<i32>, target: i32) -> i32 {
|
||||
let (mut left, mut right) = (0, nums.len());
|
||||
|
Reference in New Issue
Block a user