Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please make the add() method for the scapegoat tree, given the following methods

ID: 3817764 • Letter: P

Question

Please make the add() method for the scapegoat tree, given the following methods.

Background info:

package structures import java il iterator; public class ScapegoatTree extends Comparable> extends Binary Search private int upperBound 0; @Override public void add t) TODO Constructor for BSTNodexT public BSTNodeCT data BSTNode left, BSTNode right) this data data this left left this right right isBalancedC method from BinarySearchTree public boolean isBalancedC getC method from BinarySearchTree public T get CT t)

Explanation / Answer

Since you have not provided details of BinarySearchTree<T> class and no details about how you want to implment Node, I am assuming that you want everything from scratch.

The best I can do to help you is to refer you to the opensource code below. I could have written my own code, but there is no point in it, as it will be same and waste of time. The following reference has complete code with clear comments and explanations. You can use the add() and it's helper methods from it.

http://www.sanfoundry.com/java-program-implement-scape-goat-tree/