For this Question: Given a Binary Tree, find diameter of it. The <b>diameter</b> of a tree is the number of nodes on the longest path between two leaves in the tree. The diagram below shows two trees each with diameter nine, the leaves that form the ends of a longest path are shaded (note that there is more than one path in each tree of length nine, but no path longer than nine nodes).<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 getDiameter() that takes "root" node as parameter.

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

<b>Sum of "N" over all testcases does not exceed 10^5</b>

For <b>Custom Input:</b>
First line of input should contains the number of test cases T. For each test case, there will be two lines of input.
First line contains number of nodes N. Second line will be a string representing the tree as described below: 
The values in the string are in the order of level order traversal of the tree where, numbers denote node values, and a character “N” denotes NULL child.
<b>Note:</b> If a node has been declared Null using 'N', no information about its children will be given further in the array.Return the diameter of the tree.Sample Input:
2
3
1 2 3
5
10 20 30 40 60 

Sample Output:
3
4

Explanation:
Test Case1: The tree is
        1
     /      \
   2        3
The diameter is of 3 length.
Test Case2: The tree is
                           10
                        /        \
                     20         30
                  /       \
               40       60
The diameter is of 4 length., I have written this Solution Code:  static int dia = 0;
    public static int util(Node root) {
        if (root == null) return 0;

        int l = util(root.left);  // height of left subtree
        int r = util(root.right); // height of right subtree

        if (l + r + 1 > dia) dia = l + r + 1; // l+r+1 is a possible max dia

        return 1 + Math.max(l, r); // returning height of subtree
    }

    public static int getDiameter(Node root) {
       dia = 0;
        util(root);
        return dia;
    }, In this Programming Language: Java, Now tell me if this Code is compilable or not?