Skip to content

Commit

Permalink
[Search] code style fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi Gu committed Jun 12, 2016
1 parent f100e2b commit c6dc442
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Search/FindPeakElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ class FindPeakElement {

var left = 1
var right = nums.count - 2
var mid = 0

while left <= right {
var mid = (right - left) / 2 + left
mid = (right - left) / 2 + left
if nums[mid] > nums[mid - 1] && nums[mid] > nums[mid + 1] {
return mid
} else if nums[mid] < nums[mid + 1] {
Expand Down

0 comments on commit c6dc442

Please sign in to comment.