文件名称:QuickSort
-
所属分类:
- 标签属性:
- 上传时间:2014-04-30
-
文件大小:96.86kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
快速排序之所比较快,因为相比冒泡排序,每次交换是跳跃式的。每次排序的时候设置一个基准点,将小于等于基准点的数全部放到基准点的左边,将大于等于基准点的数全部放到基准点的右边。这样在每次交换的时候就不会像冒泡排序一样每次只能在相邻的数之间进行交换,交换的距离就大的多了。因此总的比较和交换次数就少了,速度自然就提高了。-Quick sort of the relatively fast, as compared to bubble sort, each exchange is leaps and bounds. Each sorting setting a reference point when the reference point is less than or equal to the number of all the reference points into the left will be greater than equal to the number of all the reference points on the right side of the reference point. So every time the exchange will not be the same as the bubble sort each number can only be exchanged between adjacent from the exchange on a big more. Therefore, the total number of comparison and exchange less, speed naturally increased.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Quick sort.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.