Y
Hacker News
new
|
ask
|
show
|
jobs
by
professoretc
1036 days ago
For 30 items bubblesort might very well have been faster than mergesort.
2 comments
harry8
1036 days ago
Bubble/selection sort with early exit can win outright on big lists if they're already almost in order. Textbook example years ago was cheque numbers which mostly are presented in order.
Know your data. (Which in this case, i don't).
link
jeltz
1036 days ago
But it always loses to insertion sort.
link
Know your data. (Which in this case, i don't).