protected void maxHeapify(int[] arr, int i) {
		int left = getLeftIndex(i);
		int right = getRightIndex(i);
		int maxIndex = 0;
		if (left < heapSize && arr[i] < arr[left]) {
			maxIndex = left;
		} else {
			maxIndex = i;
		}
		
		if (right < heapSize && arr[right] > arr[maxIndex])  {
			maxIndex = right;
		}
		
		if (maxIndex == i) {
			return;
		} else {
			swap(arr, maxIndex, i);
			maxHeapify(arr, maxIndex);
		}
		
	}