Click any of the algorithms below to see an in-depth analysis of its time complexity.
Name | Best | Average | Worst |
---|---|---|---|
Bubble Sort | Ο(n) | Ο(n²) | Ο(n²) |
Counting Sort | Ο(n+k) | Ο(n+k) | Ο(n+k) |
Heap Sort | Ο(n log n) | Ο(n log n) | Ο(n log n) |
Insertion Sort | Ο(n) | Ο(n²) | Ο(n²) |
Merge Sort | Ο(n log n) | Ο(n log n) | Ο(n log n) |
Quick Sort | Ο(n log n) | Ο(n log n) | Ο(n²) |
Selection Sort | Ο(n²) | Ο(n²) | Ο(n²) |
Tim Sort | Ο(n) | Ο(n log n) | Ο(n log n) |