Question: I have a question about how would I remove a child from a node (root)? Since I can't call remove, if I make the child null, will the children of that child move up? Like, would I just initialize it as null?? Or would I point to the child's child?

Answer: 
In a traditional binary search tree, removal of a node can have different consequences depending on how many children the node has:

* A node with no children can simply be removed
* A node with one child can be removed, and the node will be replaced by its only child. This applies regardless of whether the child is a left or right child.
* A node with two children has a slightly more complicated rule: you must find the **in-order successor** or **in-order predecessor** of the node to be removed, replace the current node's value with its sucessor's or predecessor's value, then delete the successor or predecessor (according to these rules).
You can do something like this (pseudo code):

Given a the root of the tree "root" and the node to delete or some data "x" do the following

```
 if x < root
      recurse to left child
 if x > root
      recurse to right child
 else //node found
      find the min item of the node right child //min item should be left most leaf node node
      replace the value of the node you want to delete with min nodes value
      now delete the min node
 return root;

```

code:

```
delete(Node root, Object x){
    if(root == null){
        return null;
    }

    if(data < root.data){
        root = delete(root.left);
    }else if(root.data < data){
        root = delete(root.right);
    }else{
        if(root.left != null && root.right != null){
            Object tmp = findMin(root.right);
            root.data = tmp;
            root.right = delete(root.right, tmp);
        }else{
            return (root.left != null) ? root.left : root.right;    
        }
    }
return root;

```

}