LintCode(easy)合并排序数组

class Solution {
public:
    /**
     * @param A and B: sorted integer array A and B.
     * @return: A new sorted integer array
     */
    vector<int> mergeSortedArray(vector<int> &A, vector<int> &B) {
        // write your code here
        for(auto c:A)
        B.push_back(c);
        sort(begin(B),end(B));
        return B;
    }
};

你可能感兴趣的:(LintCode)