给定C++快速排序代码,选出错误的返回表达式

ni418142 单选题 共 个子题
vector<int> operator +(vector<int> lA, vector<int> lB)
{
    vector<int> lst;
    for (int i = 1; i < lA.size(); i++)
        lst.push_back(lA[i]);
    for (int i = 1; i < lB.size(); i++)
        lst.push_back(lB[i]);
    return lst;
}
vector<int> qSort(vector<int> lst)
{
    if (lst.size() < 2)
        return lst;
    int pivot = lst[0];
    vector<int> less, greater;
    for (int i = 1; i < lst.size(); i++)
        if (lst[i] <= pivot) less.push_back(lst[i]);
        else greater.push_back(lst[i]);
    return ____________________;
}
A

qSort(less) + (vector<int>)pivot + qSort(greater)

B

(vector<int>)pivot + (qSort(less) + qSort(greater))

C

(qSort(less) + (vector<int>)pivot + qSort(greater))

D

qSort(less) + pivot + qSort(greater)

正在加载题目数据…
已答 /
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析
讨论
发布
登录后参与讨论 立即登录
发布讨论需先绑定并验证手机号 去绑定手机号
加载中…
我
我
回复 @
回复 @
发送
还没有人讨论,来发表第一条吧