private int binarySearchRec(int[] arr, int k, int f, int r) {
		// why the condition contains f == r? because it will overlap if you
		// search the front or rear element, and it need one more comparison
		if (f <= r) {

			int m = (f + r) / 2;
			if (k == arr[m])
				return m;
			else if (k < arr[m])
				return binarySearchRec(arr, k, f, m - 1);
			else
				return binarySearchRec(arr, k, m + 1, r);
		}
		return -1;
	}