public int findPeakElement(int[] nums) {
		// Critical assumption: nums[-1] = nums[n] = -∞.
		// Binary Search: If nums[m - 1] > nums[m] there must be at least 1 peak in left half
		// Else nums[m + 1] > nums[m] there must be at least 1 peak in right half
		int n = nums.length;
		if (n < 1)
			return -1;
		int l = 0, r = n - 1;
		while (l < r) {
			int m = l + (r - l) / 2;
			if ((m == 0 || nums[m - 1] < nums[m])
					&& (m == n - 1 || nums[m + 1] < nums[m]))
				return m;
			else if (m > 0 && nums[m - 1] > nums[m])
				r = m - 1;
			else if (nums[m + 1] > nums[m])
				l = m + 1;
			else
				return -1;
		}
		return l;
	}