作业帮 > 综合 > 作业

32,74,25,53,28,43,86,37中元素从小到大顺序排列

来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/08/08 13:04:41
32,74,25,53,28,43,86,37中元素从小到大顺序排列
将数组(32.74,25,53,28,43,86,37)中的元素按从小到大的顺序排列,每次可以交换任意两个元素,最少需要交换几次?需要过程
32,74,25,53,28,43,86,37中元素从小到大顺序排列
#include "stdio.h"
int count;
void quicksort(int data[],int low,int high)
{/*用快速排序方法数组元素data[low..high]作排序*/
int i,pivot,j;
if(low