I need to implement the deleteMin method that takes a TreeNode nand removes the min element in the subtree rooted at n. To performthe deletion use the updateParent. This is the skeletonprovided
import java.util.*;
public class BSTSet<T extends Comparable<T>>implements NavigableSet<T> {
// the root of the tree
protected TreeNode<T> root;
// number of TreeNodes in the tree
public int size;
public BSTSet() {
root = null;
size = 0;
}
/*
Insert the element d into the Binary Search Tree
*/
@Override
public void add(T e) {
insert(root,e);
}
/* Creates a BST from the given array. To get the BSTthat you
PayPal Gateway not configured
PayPal Gateway not configured