Question: Compute height of a SimplerBST tree (Java) Add a public method to P3SimplerBST named height that takes no parameters and that, when called, returns the
Compute height of a SimplerBST tree (Java)
Add a public method to P3SimplerBST named height that takes no parameters and that, when called, returns the height of the root node of the tree. The height of a node is defined as follows:
-A leaf node has height 0.
-A node with one child has a height of 1 plus the height of its child.
-A node with two children has a height of 1 plus the larger of the heights of its children.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
