Reputation: 307
I have the following understanding - Both bubble and insertion sort have time complexities
While selection sort has all time complexities (best, avg and worse): (n^2)
Following this, here are my questions based on what I generally hear about these algorithms -
Upvotes: 0
Views: 1168
Reputation: 1
As far as I know bubble sort is the worst in terms of efficiency, especially if you have reverse sorted lists or large lists. Best case for bubble sort is if almost the entire list is already sorted. You have to check the complexity of every algorithm on your case to figure out which one is the best.
Upvotes: -1