1.声明一个额外空间。 空间复杂度O(n) class Solution { public: void merge(int A[], int m, int B[], int n) { vector<int> c(m+n); int i = 0, j = 0, k = 0; while(i < m && j < n){ if(A[i] < B[j])c[k++] = A[i++]; else c[k++] = B[j++]; } ...