For this Question: Given a Binary Search Tree (BST) and a node <b>x</b>, your task is to delete the node 'x' from the BST.
If no node with value x exists then, do not make any changes<b>User Task:</b>
Since this will be a functional problem. You don't have to take input. You just have to complete the function <b>deletInBST()</b> that takes "root" node and the value to be deleted as parameter. The printing is done by the driver code. 

<b>Constraints:</b>
1 <= T <= 100
1 <= N <= 10^3
1 <= node values <= 10^4
1 <= K <= 10^3

<b>Sum of "N" over all testcases does not exceed 10^5</b>Return the node of BST after deletion.Input:
2
3
2 1 3 N N N N
2
9
1 N 2 N 8 5 11 4 7 9 12
9

Output:
1 3 
1 2 4 5 7 8 11 12 

Explanation:-
Fortest1:-     
before deletion:-   
                                   2
                                 /   \
                               1      3

after deletion:-
                                     1
                                       \
                                         3, I have written this Solution Code:     static Node  minimumElement(Node root) 
    { 
        int minv = root.data; 
        while (root.left != null) 
        { 
            minv = root.left.data; 
            root = root.left; 
        } 
         return root; 
    } 
 
	public static Node deleteInBST(Node root, int value) {
        if (root == null)
            return null;
        if (root.data > value) {
            root.left = deleteInBST(root.left, value);
        } else if (root.data < value) {
            root.right = deleteInBST(root.right, value);

        } else {
            // if nodeToBeDeleted have both children
            if (root.left != null && root.right != null) {
                Node temp = root;
                // Finding minimum element from right
                Node minNodeForRight = minimumElement(temp.right);
                // Replacing current node with minimum node from right subtree
                root.data = minNodeForRight.data;
                // Deleting minimum node from right now
                root.right = deleteInBST(root.right, minNodeForRight.data);

            }
            // if nodeToBeDeleted has only left child
            else if (root.left != null) {
                root = root.left;
            }
            // if nodeToBeDeleted has only right child
            else if (root.right != null) {
                root = root.right;
            }
            // if nodeToBeDeleted do not have child (Leaf node)
            else
                root = null;
        }
        return root;
    }

, In this Programming Language: Java, Now tell me if this Code is compilable or not?