It can be done for fixed-length lists. Optimal sorting networks [1] are an active research topic with many interesting connections to differentiable sorting and ranking [2].
[1]: https://en.wikipedia.org/wiki/Sorting_network#Optimal_sortin...
[1]: https://en.wikipedia.org/wiki/Sorting_network#Optimal_sortin...
No comments yet.