Re:Is this the simplest (and most surprising) sorting algori...
by sli on Tuesday October 05, 2021 @06:48PM
(#28766720)
I remember seeing a (gag) variation of counting sort that just provided each element as an argument to `sleep`.
[ Parent
| on HN ]
Re:Is this the simplest (and most surprising) sorting algori...
by shitlord on Tuesday October 05, 2021 @09:04PM
(#28767870)
Yup, sleep sort: https://rosettacode.org/wiki/Sorting_algorithms/Sleep_sort
Re:Is this the simplest (and most surprising) sorting algori...
by tylerhou on Tuesday October 05, 2021 @08:29PM
(#28767619)
That’s more like heapsort, because the OS will use a heap to implement a priority queue that contains times for when the next process needs to be scheduled.
Re:Is this the simplest (and most surprising) sorting algori...
by OldHand2018 on Tuesday October 05, 2021 @07:17PM
(#28766966)
Brilliant!
Although if it took a long time to enumerate the list of elements…