mirror of
https://github.com/chefyuan/algorithm-base.git
synced 2025-08-13 02:02:06 +00:00
代码重构 【Github Actions】
This commit is contained in:
@@ -113,10 +113,10 @@ func findMin(nums []int) int {
|
||||
right := len(nums) - 1
|
||||
|
||||
for (left < right) {
|
||||
|
||||
|
||||
if (nums[left] < nums[right]) {
|
||||
return nums[left]
|
||||
}
|
||||
}
|
||||
mid := left + ((right - left) >> 1)
|
||||
if (nums[left] > nums[mid]) {
|
||||
right = mid
|
||||
|
Reference in New Issue
Block a user