Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
catwell
on Oct 5, 2021
|
parent
|
context
|
favorite
| on:
Is this the simplest (and most surprising) sorting...
This is a slightly simpler (because of unicity) version of bucket sort or counting sort.
sli
on Oct 5, 2021
[–]
I remember seeing a (gag) variation of counting sort that just provided each element as an argument to `sleep`.
shitlord
on Oct 6, 2021
|
parent
|
next
[–]
Yup, sleep sort:
https://rosettacode.org/wiki/Sorting_algorithms/Sleep_sort
tylerhou
on Oct 6, 2021
|
parent
|
prev
|
next
[–]
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.
OldHand2018
on Oct 5, 2021
|
parent
|
prev
[–]
Brilliant!
Although if it took a long time to enumerate the list of elements…
ballenf
on Oct 6, 2021
|
root
|
parent
[–]
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: