template void heapsort(E A[], int n) { E maxval; heap H(A,n,n); for (int i=0;i