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

It seems to only work for a fixed size. Wouldn’t that be called a sorting network?



It is a sorting network corresponding to bubble sort on 5-element input.

It is actually pretty good - the code uses 10 comparisons, while the optimal sorting network for 5 elements uses 9: https://bertdobbelaere.github.io/sorting_networks.html#N5L9D...


That’s a cool page! Thanks!




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

Search: