Data Structures(数据结构)Course 11 Advanced Sorting.ppt

Data Structures(数据结构)Course 11 Advanced Sorting.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Data Structures(数据结构)Course 11 Advanced Sorting.ppt

* 西南财经大学天府学院 LOGO Data Structures(数据结构) Course 11: Advanced Sorting Vocabulary Sort (排序) Internal sort (内排序) External sort (外排序) Ascending order (升序) Descending order (降序) Insertion sort (插入排序) Straight insertion sort (直接插入排序) Shell sort (希尔排序) Selection sort (选择排序) Straight selection sort (直接选择排序) Heap sort (堆排序) Exchange sort (交换排序) Bubble sort (冒泡排序) Quick sort (快速排序) Stability (稳定性) Pass (一趟排序) Highlights in this chapter General sort concept Sort order Sort stability Sort efficiency passes Insertion sorts Selection sorts Exchange sorts 11-1 General sort concept Internal sort External sort Sort order Sort stability Sort efficiency passes All of data are held in primary memory during the sorting process. It are classified as : Insertion Sort Selection sort Exchange sort Merging sort Distribution sort Uses primary storage (内存) for the data currently being sorting and secondary storage (外存) for any data that will not fit in primary memory. Data may be sorted in either ascending or descending order. The sort order identifies the sequence of the data A measure of the relative efficiency of a sort. It is usually an estimate of the number of comparisons and moves required to order an unordered list. Each traversal of the during the sorting process. 11-2 Insertion sorts Insertion sort: in each pass of an insertion sort, one or more pieces of data are inserted into their correct location in an order list. In this section we study two insertion sorts, the straight insertion sort and the shell sort. Straight insertion sorts In the straight insertion sort, the list at any moment is divided into two sublists: sorted and unsorted. In each pass, the first element of the unsort sublist is transferred to the sorted sublist by inserting it at the appropriate place. Unsorted 23 45 78 8 32 56 After pass 2 Sorted Unsorted 8 23 45 78 32 56 After pass 3 Sorted 8 23 32 45 78 56 After pass 4 Sorted Unsorted 23 78 4

文档评论(0)

gtez + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档