News for hackers. Stuff that matters.
Re:Bubblesort, rocksort, and cocktail-shaker sort by jedisct1 on Wednesday December 16, 2020 @07:32AM (#25441785)
The sleep sort only requires n operations.

for x in "$@"; do (sleep $x; echo $x) &; done

Re:Bubblesort, rocksort, and cocktail-shaker sort by ironmagma on Wednesday December 16, 2020 @09:19AM (#25442732)
Computationally, this (ab)uses the scheduler to do your sorting for you. So really the performance becomes whatever your scheduler’s performance is, probably heapsort time (O(n log n)).
Re:Bubblesort, rocksort, and cocktail-shaker sort by bluGill on Wednesday December 16, 2020 @08:19AM (#25442142)
Although if your computer is slow compared to the size of the list this will not work due to race conditions. Still cleaver.