Question: Trees Aims 1 . Binary Search Tree Implementation Following the lecture slides as a guide, implement a Binary Search Tree using a DSATreeNode and DSABinarySearchTree

Trees Aims 1.Binary Search Tree Implementation Following the lecture slides as a guide, implement a Binary Search Tree using a DSATreeNode and DSABinarySearchTree class. Note: DSATreeNode has already been written for you, but youll need to understand and test it.The code for find()was already implemented for you -insert()and delete()are very similar. The methods must all use the recursive approaches and pseudocode from the lecture slides. You may want to leave delete()until you finish the rest of the practical and then come back to it.2.Implement Additional Methods The lecture slides described the approach for doing min(),max()and height().Implement each of these operations in DSABinarySearchTree. Now consider how you would give a percentage score for how balanced the tree is.Implement this approach as a new method called balance().3.Implement Traversal Methods The lecture slides described the approach for doing inorder(),preorder()and postorder()traversals of a tree. Add recursive implementations of these algorithms inside DSABinarySearchTree to output the traversed tree. 4.Interactive Menu for DSABinarySearchTree Setup an interactive menu system to explore building a binary tree from scratch. Include at least the following options: (a)Add node (b)Delete node (c)Display the tree -ask the user if they want inorder, preorder or postorder traversal.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!