Re:
by Jaxan on Sunday November 05, 2023 @06:06AM
(#38150067)
It seems to only work for a fixed size. Wouldn’t that be called a sorting network?
[ Parent
| on HN ]
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...