Hacker News new | past | comments | ask | show | jobs | submit login

That seems a strange assertion - I was under the impression that insertion sort beats bubble sort on small arrays, pretty much always, and even in 'nearly sorted' arrays, which is often touted as a strength of bubble sort.

http://www.sorting-algorithms.com/ gives a decent overview with n equal to 20, 30, 40, or 50, but nothing smaller. Now I'm curious.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: