mirror of
https://github.com/arkorty/LeetCode.git
synced 2026-03-17 16:51:46 +00:00
Initial commit
This commit is contained in:
10
Easy/merge-sorted-array/solution.cpp
Normal file
10
Easy/merge-sorted-array/solution.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
class Solution {
|
||||
public:
|
||||
void merge(std::vector<int> &nums1, int m, std::vector<int> &nums2, int n) {
|
||||
for (int i = 0; i < n; ++i) {
|
||||
nums1[m + i] = nums2[i];
|
||||
}
|
||||
|
||||
std::sort(nums1.begin(), nums1.end());
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user