Write a method called trim that accepts minimum and maximum integers as parameters and removes from the

Question:

Write a method called trim that accepts minimum and maximum integers as parameters and removes from the tree any elements that are not within that range inclusive. For this method you should assume that your tree is a binary search tree and that its elements are in valid binary search tree order. Your method should maintain the binary search tree ordering property of the tree. This property is important for solving this problem.

Reference Tree #2 2 Reference Tree #1 1 7. 4 4 Reference Tree #3 2 3 8. 9. 3. 1.

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

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: