Stable | In Place | Small Size | Typical Size | Large Size | |
Heap Sort | N | Y | OK | OK | Good |
Merge Sort | Y | N | OK | OK | OK |
Quick Sort | N | Y | OK | Good | Bad |
2^n Quadratic Sorts | |||||
Insertion Sort | Y | Y | Good | Bad | Bad |
Selection Sort | Y | Y | Good | Horrible | Horrible |
Bubble Sort | Y | OK | Horrible | Do not use |
Heap Sort
Sorting using a heap data structure flattened in an array, sorting is in place, not stable, slower than quick sort in average running time. Complexity is nlogn
Merge Sort
Sorting using extra data structure. complexity is nlogn, not in place, but stable
Quick Sort
Sorting using a moving pivot along an array, sorting is in place, not stable, faster than Heap Sort but worst worst case scenario with n^2.
Insertion Sort
Fast for small sizes, but really bad for large size with n^2
Bubble Sort
Bad at worst case usually means good at small set because of 2^n quadratic.