Name | Worst Case | Average Case | Best Case |
---|---|---|---|
Linear Search | O(n) | O(n) | O(1) |
Binary Search | O(log2n) | O(log2n) | O(1) |
Insertion Sort | O(n^2) | O(n^2) | O(n) |
Selection Sort | O(n^2) | O(n^2) | O(n^2) |
Bubble Sort | O(n^2) | O(n^2) | O(n) |
Merge Sort | O(nlogn) | O(nlogn) | O(nlogn) |
Quick Sort | O(n^2) | O(nlogn) | O(nlogn) |
Heap Sort | O(nlogn) | O(nlogn) | O(nlogn) |
Stack | O(1) - Push, Pop | ||
Queue | O(1) | O(1) | O(1) |
Circular Queue | O(1) | O(1) | O(1) |