#include //for reading from the file #include //for normal input/output #include //for the timings of the code using namespace std; //include your appropriate headers here //like for bSearchTreeType and any others int main() { //open the file for reading ifstream in; in.open("bst.txt"); //create your binary search tree //**** bSearchTreeType bst; //build the bst int num; //for reading data in >> num; //get the first number while(in) { //add the number to the tree //**** bst.insert(num); //get the next one in >> num; }//end while loop //now that the bst is ready we need to time the traversals //we are going to run the traversal 10 times, timing each //and tallying up the times and computing an average //we need some data to do this double sum = 0, average=0;//holds the average time clock_t start, end;//these are the timers //run the simulation 10 times for(int i=0; i< 10; i++) { start = clock();//start the timer //call your traversal algorithm //**** bst.whatever(); wherer whatever is the traveral algorithm end = clock(); //add the time to the sum sum += (double)end-start; } //calculate the average average = sum / 10.0; //output your results cout << "The average time taken is: " << average/CLOCKS_PER_SEC << " seconds." << endl; return 0; }//end main program