Big O—Popular Algorithms
Sorting Algorithms
Table below shows the average time complexities for different sorting algorithms. Also, it includes corresponding (worst) space complexities.
Algorithm | Average Time | Worst Space |
---|---|---|
Quick Sort | ||
Merge Sort | ||
Tim Sort | ||
Heap Sort | ||
Bubble Sort | ||
Insertion Sort | ||
Selection Sort | ||
Tree Sort | ||
Radix Sort | ||
Counting Sort |
***More will be added.
Searching Algorithms
Table below shows the average time complexities for different sorting algorithms. Also, it includes corresponding (worst) space complexities.
Algorithm | Average Time | Worst Space |
---|---|---|
Binary search | ||
Linear search | ||
Graph BFS | ||
Graph DFS | ||
Shortest-path (using min-heap) |
***More will be added.
Other Algorithms
Will be updated. Check back later.