Skip to content

Commit

Permalink
[notes][12_sorts] opening question, done.
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam0205 committed Oct 26, 2018
1 parent 7ef7e8b commit 04e3d8e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions notes/12_sorts/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,10 @@ std::pair<BidirIt, BidirIt> inplace_partition(BidirIt first,
* 因此,快速排序的时间复杂度为 $\Theta(n\log n)$
* 空间复杂度
* 一般来说,空间复杂度是 $\Theta(1)$,因此是原地排序算法
## 开篇问题
* 分区,看前半段元素数量
* 前半段元素数量 < K,对后半段进行分区
* 前半段元素数量 > K,对前半段进行分区
* 前半段元素数量 = K,前半段末位元素即是所求

0 comments on commit 04e3d8e

Please sign in to comment.