next up previous
Up: CSE 2320: Algorithms and Previous: Best Case

Summary of Comparison Sorts



Sort Worst Case Average Case Best Case Comments
Insertion Sort \(\Theta(n^2)\) \(\Theta(n^2)\) \(\Theta(n)\)  
Merge Sort \(\Theta(n lg n)\) \(\Theta(n lg n)\) \(\Theta(n lg n)\) Requires Memory
Heapsort \(\Theta(n lg n)\) \(\Theta(n lg n)\) \(\Theta(n lg n)\) Large constants
Quicksort \(\Theta(n^2)\) \(\Theta(n lg n)\) \(\Theta(n lg n)\) Small constants



Copyright © 1998 The University of Texas at Arlington