Live data from Hacker News

Chronosort

ledoc.itch.io

11–14 of 14 posts

Re: Chronosort

#11

Earlier quoted context omitted.

It is as silly as bogosort. It's queue-sort. You put the elements into a priority queue, then remove them in property order and put them into a list. Here you just use the inherent queue of a timer system, which wastes time between extracting the next element. That's silly and inefficient, and disingenuous in trying to hide the queue.

Chronosort is closer to radix sort, as both are O(n) if values are bounded. Queue-sort (aka heapsort) is O(n log n).

And with minor O(n) modifications, chronosort is fixed time too!

Re: Chronosort

#12
post #2

Why do games like this have one game a day? What's preventing them randomizing it so I can keep playing? I mean I'll be honest, it's pretty frustrating given I'll likely never visit your website ever again.

I used to play https://wikitrivia.tomjwatson.com/, basically the same and it allows playing nay number of games.

Re: Chronosort

#13
post #2

Why do games like this have one game a day? What's preventing them randomizing it so I can keep playing? I mean I'll be honest, it's pretty frustrating given I'll likely never visit your website ever again.

You answered your own question at the end there. It's to keep you coming back every day.

Re: Chronosort

#14
post #6

I thought this was going to be a silly sorting algorithm, like bogosort. So, here's my version of chronosort: Given a set of natural numbers, place them all on a timer, with a timeout equal to the number, and callback argument also equal to the number. The callback function simply appends its argument to the end of a shared list. At some point you will have a sorted and (eventually) complete list :)

That's called "sleepsort".

For examples, https://hn.algolia.com/?q=sleepsort , https://stackoverflow.com/questions/6474318/what-is-the-time... , https://stackoverflow.com/questions/74917807/is-there-any-pr...

Post reply on HN