#include "TreeNode.h"
#include <stdlib.h>

struct TreeNode *sortedArrayToBST(int *nums, int numsSize)
{
    struct TreeNode *node = NULL;
    if (numsSize <= 0)
        return node;
    node = (struct TreeNode *)malloc(sizeof(struct TreeNode));

    node->val = nums[numsSize / 2];
    node->left = sortedArrayToBST(nums, numsSize / 2);
    node->right = sortedArrayToBST(nums + numsSize / 2 + 1, numsSize - numsSize / 2 - 1);
    return node;
}

int main()
{
    return 0;
}
