Modify Figs. 21.15 and 21.16 so the Tree class provides a method getDepth that determines how many

Question:

Modify Figs. 21.15 and 21.16 so the Tree class provides a method getDepth that determines how many levels are in the tree. Test the method in an application that inserts 20 random integers into a Tree.

Fig. 21.15I // Fig. 21.15: Tree.java 2 // TreeNode and Tree class declarations for a binary search tree. 3 package

Fig. 21.16I // Fig. 21.16: TreeTest.java 2 // Binary tree test program. 3 import java.security.SecureRandom; import

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: