private static void maxHeapify(int[] array, int index, int heapSize) {
		int largest = index;
		int left = ((index * 2 + 1) <= heapSize - 1) ? (index * 2 + 1) : -1;
		int right = ((index * 2 + 2) <= heapSize - 1) ? (index * 2 + 2) : -1;
		
		if(left == -1 && right == -1) {
			return;
		}
		
		if(left != -1 && array[largest] < array[left]) {
			largest = left;
		}
		
		if(right != -1 && array[largest] < array[right]) {
			largest = right;
		}
		
		if(largest != index) {
			swap(array, index, largest);
			maxHeapify(array, largest, heapSize);
		}
	}