快速排序

既通过
1.low 和 high 两个游标
2.移动游标至 low指向的数 <目标数,high 指向的数 >目标数

3.交换两个被卡住的游标指向的数 继续移动,直到low和high 重合

4.low 和 high 交会的位置-1就是 目标应该处于的位置

5.第一个数将该数列 分为 两个部分
再按照相同的方式对两个部分进行排序。。。。。。。直到排序完成


既通过
1.low 和 high 两个游标
2.移动游标至 low指向的数 <目标数,high 指向的数 >目标数
3.交换两个被卡住的游标指向的数 继续移动,直到low和high 重合
4.low 和 high 交会的位置-1就是 目标应该处于的位置
5.第一个数将该数列 分为 两个部分
再按照相同的方式对两个部分进行排序。。。。。。。直到排序完成
本文标题:1.快速排序 log2 n^2
本文链接:https://www.haomeiwen.com/subject/huokgxtx.html
网友评论