public int getMagicIndex(int array[], int lo, int hi) {
		if (lo > hi)
			return -1;
		else if (lo == hi && array[lo] == lo)
			return lo;
		else {
			int mid = (lo + hi) / 2;
			if (array[mid] > mid)
				return getMagicIndex(array, lo, mid - 1);
			else if (array[mid] == mid)
				return mid;
			else
				return getMagicIndex(array, mid + 1, hi);
		}
	}