public int[] maxHeapify(int[] A, int position, int heapSize){
		int positionLeft  = left(position);
		int positionRight = right(position);
		
		int largest = position;	//store the largest element between left right and parent
		
		if(positionLeft <= heapSize && A[positionLeft] > A[largest]){
			largest = positionLeft;
		}
		
		if(positionRight <= heapSize && A[positionRight] > A[largest]){
			largest = positionRight;
		}
		
		if(largest != position){
			exchange(A, largest, position);
			
			maxHeapify(A, largest, heapSize);
		}
		
		return A;
	}