0 ms easy java solution
\nclass TreeNode {\n\tint val;\n\tTreeNode left;\n\tTreeNode right;\n \n\tTreeNode(int x) {\n\t\tval = x;\n\t}\n}\n \npublic class Solution {\n\tpublic TreeNode
```\nclass TreeNode {\n\tint val;\n\tTreeNode left;\n\tTreeNode right;\n \n\tTreeNode(int x) {\n\t\tval = x;\n\t}\n}\n \npublic class Solution {\n\tpublic TreeNode sortedArrayToBST(int[] num) {\n\t\tif (num.length == 0)\n\t\t\treturn null;\n \n\t\treturn sortedArrayToBST(num, 0, num.length - 1);\n\t}\n \n\tpublic TreeNode sortedArrayToBST(int[] num, int start, int end) {\n\t\tif (start > end)\n\t\t\treturn null;\n \n\t\tint mid = (start + end) / 2;\n\t\tTreeNode root = new TreeNode(num[mid]);\n\t\troot.left = sortedArrayToBST(num, start, mid - 1);\n\t\troot.right = sortedArrayToBST(num, mid + 1, end);\n \n\t\treturn root;\n\t}\n}\n```
[]