Sleepsort

It simply amazed me the cleverness that this guy on 4chan had when writing this algorithm.

For each number in the list, it spawns a process waiting an amount of time equal with the number received and afterwards prints its.

Brilliant, I would say.


Filed under Code