For this Question: Given a Binary Search Tree. The task is to find the <b>minimum element</b> in this given BST. If the tree is empty, there is no minimum element, so print <b>-1</b> in that case.<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>minValue()</b> that takes "root" node as parameter and returns the minimum value(-1 in case tree is empty). The printing is done by the driver code. 

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

<b>Sum of "N" over all testcases does not exceed 10^5</b>For each testcase you need to return the minimum element in BST.Input:
2
5 4 6 3 N N 7 1
9 N 10 N 11

Output:
1
9

Explanation:
Testcase 1: We construct the following BST by inserting given values one by one in an empty BST.
            5
          /     \
       4         6
     /              \
   3                7
   /
 1

The minimum value in the given BST is 1.
Testcase 2: We construct the following BST by inserting given values one by one in an empty BST.
             9
                \
                10
                    \
                    11
The minimum value in the given BST is 9., I have written this Solution Code: 
static int minValue(Node node)
    {
        // base case
        if(node==null)
            return -1;
        
        Node current = node;
        
        // iterate left till node is not null
        while (current.left != null)
        {
            current = current.left;
        }
        
        return (current.data);
    }, In this Programming Language: Java, Now tell me if this Code is compilable or not?