```
#include <algorithm>
class Solution {
public:
void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) {
if(n == 0)
return;
for(int i = m; i < m+n; i++)
nums1[i] = nums2[i-m];
if(m == 0)
return;
std::sort(nums1.begin(),nums1.end());
}
};
```