import java.io.File; import java.io.FileNotFoundException; import java.util.Arrays; import java.util.Scanner; public class ArrayHeapSort { private int[] A; public ArrayHeapSort(int[] A){ this.A = A; buildHeap(); } private void heapify(int i, int size){ // left and right subtrees are already heaps // need to bubble element i in place top down } // implement the buildHeap algorithm described in the lecture notes private void buildHeap(){ } // implement the in place heapSort algorithm described in the lecture notes public void heapSort(){ } // return the heap content public String toString(){ return Arrays.toString(A); } public static void main(String[] args) throws FileNotFoundException{ // scanner for input file Scanner scan = new Scanner( new File (args[0])); // first int in input: number of ints to sort following int n = Integer.parseInt(scan.next()); int[] A = new int[n]; for(int i = 0; i