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

I don't know about insertion sort - you need to do a nested loop through the already-sorted part of the array to find where it should go (which requires knowing how much is already sorted), and move multiple values around when you insert it (easy in a linked list, harder in an array (another nested loop!)).



Selection sort is simpler than Insertion sort.




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

Search: