public static void maxHeapify(int[] A, int i, int heapSize){
		int l=left(i);
		int r=right(i);
		int largest;
		int temp;
		if (l<heapSize && A[l]>A[i]){
			largest=l;
		}else{
			largest=i;
		}
		if (r<heapSize && A[r]>A[largest]){
			largest=r;
		}
		if (largest!=i){
			temp=A[i];
			A[i]=A[largest];
			A[largest]=temp;
			maxHeapify(A,largest,heapSize);
		}
	}