Python : Iterative with Queue
\npython \n#Recursive\ndef sortedArrayToBST(self, nums):\n    if not nums:\n        return None\n    center=len(nums)//2\n    node=TreeNode(nums[center])\n    n
\n```python \n#Recursive\ndef sortedArrayToBST(self, nums):\n    if not nums:\n        return None\n    center=len(nums)//2\n    node=TreeNode(nums[center])\n    node.left=self.sortedArrayToBST(nums[:center])\n    node.right=self.sortedArrayToBST(nums[center+1:])\n    return node\n```    \n```python\n# Iterative\n def sortedArrayToBST(self, nums):\n     if not nums:\n         return None\n     center=len(nums)//2\n     head=TreeNode(nums[center])\n     queue=[(head,nums[:center],nums[center+1:])]\n     while queue:\n         node,L,R=queue.pop(0)\n         if L:\n             center=len(L)//2\n             l_node=TreeNode(L[center])\n             node.left=l_node\n             queue.append((node.left,L[:center],L[center+1:]))\n         if R:\n             center=len(R)//2\n             r_node=TreeNode(R[center])\n             node.right=r_node\n             queue.append((node.right,R[:center],R[center+1:]))\n     return head\n    \n\n```
[]