MY C
\n\nstruct TreeNode* newNode(int val){\n    struct TreeNode* new = malloc(sizeof(struct TreeNode));\n    new->val = val;\n    new->left = NULL;\n    new->right 
```\n\nstruct TreeNode* newNode(int val){\n    struct TreeNode* new = malloc(sizeof(struct TreeNode));\n    new->val = val;\n    new->left = NULL;\n    new->right = NULL;\n    return new;\n}\n\nstruct TreeNode* ArrayToBST(int* nums, int start, int end){\n    if(start>end)\n        return NULL;\n    \n    int mid = (start+end)/2;\n    struct TreeNode* root = newNode(nums[mid]);\n    \n    root->left = ArrayToBST(nums,start,mid-1);\n    \n    root->right = ArrayToBST(nums,mid+1,end);\n    \n    return root;\n}\n\nstruct TreeNode* sortedArrayToBST(int* nums, int numsSize){\n    return ArrayToBST(nums, 0, numsSize-1);\n}\n```\n\n
[]