Question: 1. Write the methods height() and numLeaves() to compute the height and number of nodes in a complete BST. 2. Add an instance method max()

1. Write the methods height() and numLeaves() to compute the height and number of nodes in a complete BST. 2. Add an instance method max() in a BST class to return the largest element in this tree. Returns null if it does not exist [3] 3. The following are the pre-order and in-order traversals of the nodes of a binary tree: Pre-order: xPHTANRESD In-order: P K T H A XRRNSD Draw the tree. [4]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
