|
|
|
|
|
by bballbackus
5661 days ago
|
|
So is there an ideal case for selection sort that isn't shown or does it just suck? Edit: Never mind they explained: From the comparions presented here, one might conclude that selection sort should never be used. It does not adapt to the data in any way (notice that the four animations above run in lock step), so its runtime is always quadratic. However, selection sort has the property of minimizing the number of swaps. In applications where the cost of swapping items is high, selection sort very well may be the algorithm of choice. |
|