#include #include #include #include #include "book.h" #include "compare.h" #include "permute.h" #include "maxheap.h" int main(int argc, char** argv) { int i, j; int n; Int* A[20]; Int* B[20]; Int C[10] = {73, 6, 57, 88, 60, 34, 83, 72, 48, 85}; maxheap BH(B, 0, 20); maxheap Test(C, 10, 10); if (argc != 2) { cout << "Usage: heap \n"; exit(-1); } n = atoi(argv[1]); if (n > 20) { cout << "heap size " << n << " too big.\n"; exit(-1); } Randomize(); for (i=0; i AH(A, n, 20); Int* AHval; for (i=0; i