Update find_peak_element.py

This commit is contained in:
marina 2023-08-07 22:15:42 -07:00 committed by GitHub
parent 56af227e6e
commit c4e0cdc9ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ def peak_element(nums):
mid = (left + right) // 2 mid = (left + right) // 2
if nums[mid] > nums[mid + 1]: if nums[mid + 1] < nums[mid]:
right = mid right = mid
else: else:
left = mid + 1 left = mid + 1