My code is as followed:

```
class Solution {
public:
TreeNode* sortedArrayToBST(vector<int>& nums) {
return sort(nums,0,nums.size());
}
TreeNode* sort(vector<int> &nums,int start,int end){
if(end == start) return NULL;
int mid = (end+start)/2;
TreeNode* root = new TreeNode(nums[mid]);
root->left = sort(nums,start,mid);
root->right = sort(nums,mid+1,end);
return root;
}
};
```

This code will run in 20ms.

I just found that if I delete the "&" before nums in the variables declaration part, the time will increase to 108ms. I just cannot understand what's the reason of this.