neat Kotlin solution
\n    fun sortedArrayToBST(nums: IntArray, low: Int = 0, high: Int = nums.size - 1): TreeNode? {\n        if (low > high) return null\n\n        val mid = (high
```\n    fun sortedArrayToBST(nums: IntArray, low: Int = 0, high: Int = nums.size - 1): TreeNode? {\n        if (low > high) return null\n\n        val mid = (high + low) / 2\n        return TreeNode(nums[mid]).apply{\n            left = sortedArrayToBST(nums, low, mid - 1)\n            right = sortedArrayToBST(nums, mid + 1, high)\n        }\n    }\n\n```
['Java', 'Kotlin']