message: Update find-peak-element.py
diff: @@ -26,25 +26,6 @@ class Solution(object):
  """
  left, right = 0, len(nums) - 1
  - while left < right:
  - mid = left + (right - left) / 2
  - if (mid == 0 or nums[mid - 1] < nums[mid]) and \
  - (mid + 1 == len(nums) or nums[mid] > nums[mid + 1]):
  - return mid
  - elif not (mid == 0 or nums[mid - 1] < nums[mid]):
  - right = mid
  - else:
  - left = mid + 1
  -
  - return left
  -
  - def findPeakElement2(self, nums):
  - """
  - :type nums: List[int]
  - :rtype: int
  - """
  - left, right = 0, len(nums) - 1
  -
  while left < right:
  mid = left + (right - left) / 2
  if nums[mid] > nums[mid + 1]:
  @@ -54,6 +35,7 @@ class Solution(object):
  return left
  +
  if __name__ == "__main__":
  # print Solution().findPeakElement([1,2,1])
  print Solution().findPeakElement([1,2,3,1])
  