题目内容
(请给出正确答案)
提问人:网友zjing945
发布时间:2022-01-06
[主观题]
写一个递归方式的选择排序算法。 非递归选择排序算法如下: void selectionSort(int lis
写一个递归方式的选择排序算法。 非递归选择排序算法如下: void selectionSort(int list[],int last){ int current; int smallest; int holdData; int walker; for(current=0;current<last;current++){ smallest=current; for(walker=current+1;walker<=last;walker++) if(list[walker]<list[smallest])smallest=walker; holdData=list[current]; list[current]=list[smallest]; list[smallest]=holdData; } return; }
简答题官方参考答案
(由简答题聘请的专业题库老师提供的解答)
查看官方参考答案