| #include <algorithm> | #include <algorithm> | ||||
| void merge(std::vector<int>& nums1, int m, std::vector<int>& nums2, int n) { | void merge(std::vector<int>& nums1, int m, std::vector<int>& nums2, int n) { | ||||
| int total = m + n; | |||||
| while (n > 0) { | while (n > 0) { | ||||
| nums1[m++] = nums2[--n]; | nums1[m++] = nums2[--n]; | ||||
| } | } | ||||
| } | } | ||||
| std::cout << " ]" << std::endl; | std::cout << " ]" << std::endl; | ||||
| return 0; | return 0; | ||||
| } | |||||
| } |