Algorithm | Best case | Worst case | Average case |
---|---|---|---|
Quick sort | O(n log(n)) | O(n^2) | O(n log(n)) |
Merge sort | O(n log(n)) | O(n log(n)) | O(n log(n)) |
Heap sort | O(n log(n)) | O(n log(n)) | O(n log(n)) |
Bubble sort | O(n) | O(n^2) | O(n^2) |
Insertion sort | O(n) | O(n^2) | O(n^2) |
Selection sort | O(n^2) | O(n^2) | O(n^2) |
Comments
Post a Comment