jueves, 16 de junio de 2011

sleepsort for the lulz

Today I discovered a programmers' BBS on 4chan (It hit HN's front page).
There was a post talking about a sorting algorithm that the author called it 'sleepsort'
I couldn't believe I didn't thought of it before. In fact in a past post talking about Parallel::Iterator, I played with timers too.... I was sooo close :)



Lots of lols reading the full thread, with comments, optimizations, translations to other languages and puns there.

For example:

- complexity of the algo: O(highest_value_in_input)

- 40: Someone email this to Knuth.
- 41: >>40. Knuth doesn't do email anymore


Have fun.

1 comentario:

Jordi Delgado dijo...

- complexity of the algo: O(highest_value_in_input)

Yeah, sure... That's simply not correct. Or, more precisely, it is cheating... :) You have to bring the scheduler on stage...

OTH nice and funny idea (I found out yesterday at the Mongers meeting)...