Beginner friendly C++ solution. Easy to understand.
\nclass Solution {\npublic:\n    TreeNode* sortedArrayToBST(vector<int>& nums)\n    {\n        int left = 0;\n        int right = nums.size()-1;\n        return
```\nclass Solution {\npublic:\n    TreeNode* sortedArrayToBST(vector<int>& nums)\n    {\n        int left = 0;\n        int right = nums.size()-1;\n        return createBST(nums,left,right);\n    }\n    \n    TreeNode* createBST(vector<int> nums,int left,int right)\n    {\n        TreeNode* newroot;\n        if(left <= right)\n        {\n            int mid = (left+right) / 2;\n            newroot = new TreeNode(nums[mid]);\n            newroot->left = createBST(nums,left,mid-1);\n            newroot->right = createBST(nums,mid+1,right);\n            return newroot;\n        }\n        return NULL;\n    }\n};\n```\n**Like the solution?\nPlease upvote \u30C4**\n\nIf you can\'t understand any step/point, feel free to comment.\nHappy to help.
['Recursion', 'C', 'C++']