Algorithm CH7 Quick sort

Algorithm CH7 Quicksort

description

Partition

Loop invarient

Ex.

correctness

performance

* balanced case is much closer to best case
  • Intuition for the average case
  • 看最好跟最壞的分割情況,只差一個常數而已
    • 而且會被 -notation蓋掉

random version

analyse

worst case: ()

Average case:





Algorithm CH7 Quick sort
https://z-hwa.github.io/webHome/[object Object]/2024/04/30/Algorithm/Algorithm-CH7-Quick-sort/
作者
crown tako
發布於
2024年4月30日
許可協議