1.(Find the leaves) Add a method in the BST class to return the number of the leaves as follows:
/** Return the number of leaf nodes */
public int getNumberOfLeaves()
(Find the nonleaves) Add a method in the BST class to return the number of the nonleaves as follows: /** Return the number of nonleaf nodes */
public int getNumberofNonLeaves()
2. (Tree clone and equals) Implement the clone and equals methods in the BST class. Two BST trees are equal if they contain the same elements. The clone method returns an identical copy of a BST.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here