mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 20:26:07 -04:00
Update find_peak_element.py
This commit is contained in:
parent
56af227e6e
commit
c4e0cdc9ff
@ -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…
x
Reference in New Issue
Block a user