文件名称:sort
介绍说明--下载内容均来自于网络,请自行研究使用
三)排序
(1)插入排序——已知序列{17,18,60,40,7,32,73,65,85}
建立一个顺序表,采用插入排序算法的实现升序排序,打印排序结果;
(2)交换排序——已知序列{503,87,512,61,908,170,897,275,652,462}
(1)建立一个顺序表,采用冒泡排序法实现升序排序,并打印每趟排序结果;
(2)建立一个顺序表,采用快速排序法实现升序排序,并打印每趟排序结果,与(1)做比较;
(3)选择排序——已知序列{42,13,24,91,23,16,05,88}
利用简单选择排序,实现上述序列的降序排序;-C) sort (1) insertion sort- known sequences to create a sequence {17,18,60,40,7,32,73,65,85} table, using insertion sort algorithm implementation in ascending order, print, sort the results (2) Exchange sort- known sequence {503,87,512,61,908,170,897,275,652,462} (1) to establish a sequence tables, using bubble sort method to achieve ascending order, Sort and print the results of each trip (2) to establish a sequence tables, realized by quick sort in ascending order, sort and print the results of each trip, and (1) to compare (3) Select the sort- known sequence {42 , 13,24,91,23,16,05,88} using a simple selection sort, to achieve the above sequence of descending order
(1)插入排序——已知序列{17,18,60,40,7,32,73,65,85}
建立一个顺序表,采用插入排序算法的实现升序排序,打印排序结果;
(2)交换排序——已知序列{503,87,512,61,908,170,897,275,652,462}
(1)建立一个顺序表,采用冒泡排序法实现升序排序,并打印每趟排序结果;
(2)建立一个顺序表,采用快速排序法实现升序排序,并打印每趟排序结果,与(1)做比较;
(3)选择排序——已知序列{42,13,24,91,23,16,05,88}
利用简单选择排序,实现上述序列的降序排序;-C) sort (1) insertion sort- known sequences to create a sequence {17,18,60,40,7,32,73,65,85} table, using insertion sort algorithm implementation in ascending order, print, sort the results (2) Exchange sort- known sequence {503,87,512,61,908,170,897,275,652,462} (1) to establish a sequence tables, using bubble sort method to achieve ascending order, Sort and print the results of each trip (2) to establish a sequence tables, realized by quick sort in ascending order, sort and print the results of each trip, and (1) to compare (3) Select the sort- known sequence {42 , 13,24,91,23,16,05,88} using a simple selection sort, to achieve the above sequence of descending order
(系统自动生成,下载前可以参看下载内容)
下载文件列表
3.cpp
3+.cpp
3+.cpp