Hacker News new | past | comments | ask | show | jobs | submit login

This is a slightly simpler (because of unicity) version of bucket sort or counting sort.



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?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: