List of Time Complexities

Reading Time: 1 minute


Searching Algorithms

AlgorithmBest CaseWorst Case
Sequential Search$Θ(1)$$Θ(n)$
Binary Search$Θ(\log n)$$Θ(\log n)$

Sorting Algorithms

AlgorithmBest CaseWorst Case
Selection Sort$Θ(n^2)$$Θ(n^2)$
Insertion Sort$Θ(n)$$Θ(n^2)$
Quicksort$Θ(n \log n)$$Θ(n^2)$
Heapsort$Θ(n \log n)$$Θ(n \log n)$
Merge Sort$Θ(n \log n)$$Θ(n \log n)$