News for hackers. Stuff that matters.
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`.
Re:Is this the simplest (and most surprising) sorting algori... by shitlord on Tuesday October 05, 2021 @09:04PM (#28767870)
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…

Re:Is this the simplest (and most surprising) sorting algori... by ballenf on Tuesday October 05, 2021 @11:40PM (#28768917)
Pass them in as milliseconds or nanoseconds?