Homework Laboratory Assignment 8:
The next assignment of the semester is to study binary search trees. We shall write a menu driven program, similar to what was demonstrated in class, which will construct a binary search tree from the elements of a file. We shall maintain a collection of integers in a BST. Your BST should use pointers and dynamic memory. You must be able to: 1. Construct tree from file (measure effort) 2. Display tree structure (small files) 3. Add an element to the tree 4. Delete an element from the tree 5. Search the tree, (measure effort) 6. Inorder traversal 7. Preorder traversal 8. Postorder traversal 9. Depth of tree A. Height balance tree, (measure effort) B. Quit You should make some statement concerning how you feel about the effort involved in maintaining a height balanced binary search tree. Is the algorithm for balancing, as costly as it is, worth the effort? If you wish 5 points of extra credit, In addition to the above, write the same program for names rather than numbers. Program due date: TR class: Tuesday, 21 April 1998 9:55 am. MWF class: Monday, 20 April 1998, 9:30am. (New Due dates complements of Crystal.)