// cmpt225bstLab.cpp : Defines the entry point for the console application. // #include #include "time.h" #include "BST.h" using namespace std; void treeTest(); int main() { srand(time(0)); treeTest(); cout << endl << endl; return 0; } // Tests the traversal and search methods void treeTest() { BST tree; int n = 20; int searches = 10; for (int i = 0; i < n; ++i) { tree.insert(rand() % (n * 4)); } tree.print(); cout << endl << endl; for (int i = 0; i < searches; ++i) { int target = rand() % (n * 4); cout << "search for " << target << ": " << tree.search(target); cout << endl; } }