Question: Implement binary search tree class with the following operations: ( a ) In order tree traversal: print all the nodes in order tree traversal. (
Implement binary search tree class with the following operations:
a In order tree traversal: print all the nodes in order tree traversal.
b height: return the height of the tree
c No of Nodes: return the number of nodes
d No of leaves: return the number of leaves
e Checking whether it is AVL tree: return true if the BST is an AVL tree.
You may implement auxiliary routines if necessary. You can use the basis code available in the
textbook. That is you can use the code for basic operatios such as insert, delete, findMAx, contains.
Note that some of the above operations may require those operations. Your program should be
submitted in a separate file with all the source code. It should also prompt the user with options to
do one of the above operations. A sample prompt could look as below:
Traverse
Height
AllNodes
AllLeaves
IsAVL
Your option:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
