...

/

Time Complexities of Sorting Algorithms (Overview)

Time Complexities of Sorting Algorithms (Overview)

Here's a quick summary of the time complexity of sorting algorithms.

We'll cover the following...

Now that we’ve gone over how most famous and important sorting algorithms work, here’s a quick table that you can refer to when you are solving coding problems!

Insertion Selection Merge Quick Bubble
Best case O(n)O(n) O(n2)O(n^2) O(nlog(n))O(nlog(n)) O(nlog(n))O(nlog(n)) O(n)O(n)
Average case O(n2)O(n^2) O(n2)O(n^2) O(nlog(n))O(nlog(n)) O(nlog(n))O(nlog(n)) O(n2)O(n^2)
Worst case O(n2)O(n^2) O(n2)O(n^2) O(nlog(n))O(nlog(n)) O(n2)O(n^2) O(n2)O(n^2)
Access this course and 1400+ top-rated courses and projects.