第2章-分治策略3快速排序ppt课件.ppt

上传人:晟*** 文档编号:9538555 上传时间:2021-12-14 格式:PPT 页数:35 大小:923.50KB
下载 相关 举报
第2章-分治策略3快速排序ppt课件.ppt_第1页
第1页 / 共35页
第2章-分治策略3快速排序ppt课件.ppt_第2页
第2页 / 共35页
第2章-分治策略3快速排序ppt课件.ppt_第3页
第3页 / 共35页
第2章-分治策略3快速排序ppt课件.ppt_第4页
第4页 / 共35页
第2章-分治策略3快速排序ppt课件.ppt_第5页
第5页 / 共35页
点击查看更多>>
资源描述

1 2.5 快速排序问题 QuickSort l 由著名计算机科学家霍尔(C.A.R.Hoare)给出。 l 把原序列分成两个子问题,在被分成的两个子 问题以后不再需要归并。 l 被分成的两个子问题必须满足一子问题中的所 有元素都小于或等于另一子问题的任何一个元 素。2 QuickSort l Select a pivot (partitioning element) l Rearrange the list so that all the elements in the positions before the pivot are smaller than or equal to the pivot and those after the pivot are larger than the pivot l Exchange the pivot with the last element in the first (i.e., sublist) the pivot is now in its final position l Sort the two sublists3 2.5 快速排

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 实用文档资料库 > 演示文稿

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。