Graph-Algorithms Algorithms Bubble Sort | Worst-case: Quadratic O(n²) Insertion Sort | Worst-case: Quadratic O(n²) Selection Sort | Worst-case: Polynomial O(n^2) Quick Sort | Worst-case: Quadratic O(n²) Merge Sort | Worst-case: Quasilinear O(n log n) Comparison with other sorting algorithms Algorithm Average Time complexity Best Time complexity Worst Time complexity Space complexity Bubble sort O(n^2) O(n^2) O(n^2) O(n) Heap Sort O(n*log(n)) O(n*log(n)) O(n*log(n)) O(n) Merge Sort O(n*log(n)) O(n*log(n)) O(n*log(n)) Depends Quicksort O(n*log(n)) O(n*log(n)) O(n^2) O(n) Bubble sort O(n^2) O(n^2) O(n^2) O(n) Documentation | Guide & Areas of Study Terms & Keywords References Notes