// ***************************************************************** // Author: Zhixiang Chen // Class: CSCI/CMPE 3333, Fall 2014 // Lab 6: HeapSort // Date: 10/13/2014 // Comment: The code here is meant to be revised. // //----------------------------------------------------------------- // // Description: This program is to implement a generic hash table // a sorting method. // ***************************************************************** #include #include #include #include #include #include #include "lab3333_16_head.h" using namespace std; int main() { /********************************************************** Part A: Some practice **********************************************************/ ifstream inFile; ofstream outFile; //pratice integer hash table int S = 1000000; binaryHeapType bh(S+1); //recall that the first element of the heap list is not used. int num, i, j, N=20; bool tag; //generate a file of S random integers //load fill up the heap outFile.open("data.txt"); generateData(outFile, S); outFile.close(); //load the data item in data.txt to heap inFile.open("data.txt"); bh.loadData(inFile, S); inFile.close(); //bh.print(); //cout<<" the size of bh is " << bh.getSize() <