Line 21: Line 21:
 
|$\theta(n)$
 
|$\theta(n)$
 
|-
 
|-
|Merge
+
|Quick
 +
|$\theta(n^{2})$
 
|$\theta(nlgn)$
 
|$\theta(nlgn)$
 
|$\theta(nlgn)$
 
|$\theta(nlgn)$
 +
|-
 +
|Merge
 
|$\theta(nlgn)$
 
|$\theta(nlgn)$
|-
 
|Quick
 
|$\theta(n^{2})$
 
 
|$\theta(nlgn)$
 
|$\theta(nlgn)$
 
|$\theta(nlgn)$
 
|$\theta(nlgn)$

Revision as of 12:18, 8 December 2013

Algorithm Worst Case Average Case Best Case
Bubble $\theta(n^{2})$ $\theta(n^{2})$ $\theta(n^{2})$
Selection $\theta(n^{2})$ $\theta(n^{2})$ $\theta(n^{2})$
Insertion $\theta(n^{2})$ $\theta(n^{2})$ $\theta(n)$
Quick $\theta(n^{2})$ $\theta(nlgn)$ $\theta(nlgn)$
Merge $\theta(nlgn)$ $\theta(nlgn)$ $\theta(nlgn)$
Heap $\theta(nlgn)$ $\theta(nlgn)$ $\theta(nlgn)$
Algorithm Worst Case Average Case Best Case
Bubble $\theta(n^{2})$ $\theta(n^{2})$ $\theta(n^{2})$
Selection $\theta(n^{2})$ $\theta(n^{2})$ $\theta(n^{2})$
Insertion $\theta(n^{2})$ $\theta(n^{2})$ $\theta(n)$
Merge $\theta(nlgn)$ $\theta(nlgn)$ $\theta(nlgn)$
Quick $\theta(n^{2})$ $\theta(nlgn)$ $\theta(nlgn)$
Heap $\theta(nlgn)$ $\theta(nlgn)$ $\theta(nlgn)$