next up previous
Next: Quicksort: Partitioning Up: sorting Previous: SORTING BY MERGING

SORTING BY SPLITING

$W(n) = O(n^2)$ but $A(n) = O(n\log n)$


Quicksort $(A,p,r)$:

if $p<r$ then $q\leftarrow$ Partition$(A,p,r)$
Quicksort$(A,p,q)$
Quicksort$(A,q+1,r)$


Subsections

Sushil_Prasad 2014-09-25