Time Complexities of Sorting Algorithms

Algorithm | Time Complexity

Best Average Worst

Selection sort Ω(n^2) θ(n^2) O(n^2

Bubble Sort Ω(n) θ(n^2) O(n^2)

Insertion Sort Ω(n) θ(n^2) O(n^2)

Heap Sort Ω(n log(n)) θ(n log(n)) O(n log(n))

Quick sort Ω(n log(n)) θ(n log(n)) O(n^2)

Merge Sort Ω(n log(n)) θ(n log(n)) O(n log(n))

Bucket Sort Ω(n+k) θ(n+k) O(n^2)

Radix Sort Ω(nk) θ(nk) O(nk)









        Contact Us

programmersdoor@gmail.com

  • LinkedIn
  • Facebook
  • Instagram

©2023 by Programmers Door