logoalt Hacker News

throwawayffffas • today at 10:38 AM • 0 replies • view on HN

That was my first instinct as well. But if you look closer you will see, it's actually insertion sort by someone who didn't pay attention in class.

It misses the revelation you can skip already sorted positions when deiciding what goes in the next position.

Btw. Ofcourse it sorts, it's basically insertion sort with extra swaps.