- 11
- 0
- 约9.73千字
- 约 34页
- 2018-02-27 发布于湖北
- 举报
Introduction to Algorithms Second Edition by:算法导论第二版的文档
* * * * * * * * * * * * * * MERGE-SORT(A, 1, n) * The two largest elements in two arrays are sentinels Execute r-p+1 times * * Merging: MERGE(A, p, q, r) Input: Array A and indices p, q, r such that p ? q ?r Subarray A[p .. q] is sorted and subarray A[q+1 .. r] is sorted. By the restrictions on p, q, r, neither subarray is empty. Output: The two subarrays are merge into a single sorted subarray in A[p .. r]. T(n) = ?(n), where n=r-p+1 = the # of elements being merged. What is n ? The size of the original problem = the size of a subproblem. Use this technique when we analyze recursive
您可能关注的文档
- GBT19001-2008内审员转换教材(20090609完整标准版)文档.ppt
- GBT 2281-2002金属材料 室温拉伸试验方法文档.ppt
- GB_T_14685-2010_建设用卵石、碎石文档.ppt
- GB、T28001标准培训文档.ppt
- GBT50502-2009建筑工程施工组织设计规范_讲义文档.ppt
- GB 50235—2010工业金属管道工程施工规范文档.ppt
- GEMS珠宝鉴赏课件-3珠宝玉石鉴赏仪器文档.ppt
- GB 5768-2009《道路交通标志和标线》主要内容解析文档.ppt
- gb-t2828.1-2003 抽样统计标准讲义文档.ppt
- Genres in Primary Schools PowerPoint (PPT 380 Kb):小学PowerPoint类型(PPT 380 KB)文档.ppt
原创力文档

文档评论(0)