public int searchInsert(int[] nums, int target) {
		int begin = 0, end = nums.length - 1;
		while (begin <= end) {
			int mid = (end - begin) / 2 + begin;
			if (nums[mid] == target)
				return mid;
			else if (nums[mid] > target)
				end = mid - 1;
			else
				begin = mid + 1;
		}
		return begin;
	}