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
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.
Step by Step Solution
3.41 Rating (170 Votes )
There are 3 Steps involved in it
public void trim int min int max overall Root trim overall Root min max private IntT... View full answer
Get step-by-step solutions from verified subject matter experts
