public int findPeakElement(int[] nums) {
		if (nums.length == 0)
			return 0;
		if (nums.length == 1)
			return 0;
		int s = 0;
		int e = nums.length - 1;
		while (s < e) {
			int m = (s + e) / 2;
			if (s > m - 1) { // two element;
				return nums[s] > nums[e] ? s : e;
			}
			if (nums[m] > nums[m - 1] && nums[m] > nums[m + 1])
				return m;
			else if (nums[m] > nums[m - 1])
				s = m;
			else
				e = m;
		}
		return s;
	}