递归算法快速排序

所属分类:数据结构
开发工具:Delphi
文件大小:172KB
下载次数:15
上传日期:2005-12-17 10:50:55
上 传 者lishun
说明:  分而治之方法还可以用于实现另一种完全不同的排序方法,这种排序法称为快速排序(quick sort)。在这种方法中, n 个元素被分成三段(组):左段l e f t,右段r i g h t和中段m i d d l e。中段仅包含一个元素。左段中各元素都小于等于中段元素,右段中各元素都大于等于中段元素。因此l e f t和r i g h t中的元素可以独立排序,并且不必对l e f t和r i g h t的排序结果进行合并。m i d d l e中的元素被称为支点( p i v o t )。图1 4 - 9中给出了快速排序的伪代码
(divide-and-rule method can be used to achieve an entirely different sort of way, this sort called Quick Sort (quick sort). In this method, n elements are divided into three (group) : Left of l e f t and the right of g h i r t and middle m i d e d l. The middle contains only one element. Left of the elements are smaller than or equal to the middle element of the right elements are greater than or equal to the middle element. So l e r t and f g h i t element of independent sort, and not on l e r t and f g h i t ranking results merger. M i d e d l of elements called Fulcrum (p i v o t). Figure 1 4-9 is given a quick sort of pseudo-code)

文件列表:
快速排序\Project1.dpr (188, 2005-12-16)
快速排序\Project1.dof (2014, 2005-12-16)
快速排序\Project1.cfg (434, 2005-12-16)
快速排序\Project1.res (876, 2005-12-16)
快速排序\Unit1.dcu (6103, 2005-12-16)
快速排序\Project1.exe (396288, 2005-12-16)
快速排序\Unit1.~pas (2207, 2005-12-16)
快速排序\Unit1.~dfm (3161, 2005-12-16)
快速排序\Unit1.~ddp (51, 2005-12-16)
快速排序\Unit1.pas (2469, 2005-12-16)
快速排序\Unit1.dfm (3301, 2005-12-16)
快速排序\Unit1.ddp (51, 2005-12-16)
快速排序 (0, 2005-12-16)

近期下载者

相关文件


收藏者