mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-02 06:46:18 -04:00
Update find_peak_element.py
This commit is contained in:
parent
56af227e6e
commit
c4e0cdc9ff
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ def peak_element(nums):
|
|||
|
||||
mid = (left + right) // 2
|
||||
|
||||
if nums[mid] > nums[mid + 1]:
|
||||
if nums[mid + 1] < nums[mid]:
|
||||
right = mid
|
||||
else:
|
||||
left = mid + 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue