Hacker News new | ask | show | jobs
by catwell 1716 days ago
This is a slightly simpler (because of unicity) version of bucket sort or counting sort.
1 comments

I remember seeing a (gag) variation of counting sort that just provided each element as an argument to `sleep`.
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.
Brilliant!

Although if it took a long time to enumerate the list of elements…

Pass them in as milliseconds or nanoseconds?