C++ || Nice Solution || Binary - Search
Runtime: 12 ms, faster than 97.09% of C++ online submissions for Convert Sorted Array to Binary Search Tree.\nMemory Usage: 20.6 MB, less than 60.89% of C++ onl
***Runtime: 12 ms, faster than 97.09% of C++ online submissions for Convert Sorted Array to Binary Search Tree.\nMemory Usage: 20.6 MB, less than 60.89% of C++ online submissions for Convert Sorted Array to Binary Search Tree.***\n```\nclass Solution {\npublic:\n    TreeNode* sortedArrayToBST(vector<int>& nums) {\n        return helper(nums, 0, nums.size()-1);\n    }\n    TreeNode* helper(vector<int>& nums, int low,int high){\n        if(low<=high){\n            int mid = low + (high-low)/2;\n            TreeNode* root = new TreeNode(nums[mid]);\n            root->left = helper(nums, low, mid-1);\n            root->right = helper(nums, mid+1, high);\n            return root;\n        }\n        return NULL;\n    }\n};\n```
['C', 'C++']