List of Time Complexities
Reading Time: 1 minute
Searching Algorithms
| Algorithm | Best Case | Worst Case |
|---|---|---|
| Sequential Search | $Θ(1)$ | $Θ(n)$ |
| Binary Search | $Θ(\log n)$ | $Θ(\log n)$ |
Sorting Algorithms
| Algorithm | Best Case | Worst 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)$ |