Skip to content

Big O Visualizer

Sorting algorithms

Click any of the algorithms below to see an in-depth analysis of its time complexity.

NameBestAverageWorst
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)