文件名称:QuickSort
介绍说明--下载内容均来自于网络,请自行研究使用
快速排序之所比较快,因为相比冒泡排序,每次交换是跳跃式的。每次排序的时候设置一个基准点,将小于等于基准点的数全部放到基准点的左边,将大于等于基准点的数全部放到基准点的右边。这样在每次交换的时候就不会像冒泡排序一样每次只能在相邻的数之间进行交换,交换的距离就大的多了。因此总的比较和交换次数就少了,速度自然就提高了。-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