Python simple recursive solution.
\n\tdef sortedArrayToBST(self, nums: List[int]) -> TreeNode:\n        if not nums:\n            return None\n        mid = len(nums) // 2\n        root = TreeNo
\n\tdef sortedArrayToBST(self, nums: List[int]) -> TreeNode:\n        if not nums:\n            return None\n        mid = len(nums) // 2\n        root = TreeNode(nums[mid])\n        root.left = self.sortedArrayToBST(nums[:mid])\n        root.right = self.sortedArrayToBST(nums[mid+1:])\n        return root\n\t\t\n    def sortedArrayToBST1(self, nums):\n        l, r = 0, len(nums)-1\n        if l <= r:\n            mid = l + (r-l)//2\n            root = TreeNode(nums[mid])\n            root.left = self.sortedArrayToBST(nums[:mid])\n            root.right = self.sortedArrayToBST(nums[mid+1:])\n            return root\n            \n    def sortedArrayToBST(self, nums):\n        return self.helper(nums, 0, len(nums)-1)\n    \n    def helper(self, nums, l, r):\n        if l <= r:\n            mid = l + (r-l)//2\n            root = TreeNode(nums[mid])\n            root.left = self.helper(nums, l, mid-1)\n            root.right = self.helper(nums, mid+1, r )\n            return root
['Recursion', 'Python']