O(n) Sorting Algorithm: Quantum Bogosort
mathnews.uwaterloo.ca
O(n) Sorting Algorithm: Quantum Bogosort
1–10 of 19 posts
Re: O(n) Sorting Algorithm: Quantum Bogosort
#2Re: O(n) Sorting Algorithm: Quantum Bogosort
#3What's the time-space complexity of destroying the universe?
Re: O(n) Sorting Algorithm: Quantum Bogosort
#4[]http://en.wikipedia.org/wiki/Quantum_suicide_and_immortality
Re: O(n) Sorting Algorithm: Quantum Bogosort
#5http://dis.4chan.org/read/prog/1295544154
It essentially spawns a new thread for every item in the array, sleeps for an amount of time that scales with the item's value, and then prints out that item. So it's O(n + timeScale * $biggest_input)
Pretty funny / entertaining if taken lightly :P
Re: O(n) Sorting Algorithm: Quantum Bogosort
#6Re: O(n) Sorting Algorithm: Quantum Bogosort
#7Re: O(n) Sorting Algorithm: Quantum Bogosort
#8Re: O(n) Sorting Algorithm: Quantum Bogosort
#9I remember reading into this topic a while ago. Here is a relevant Wikipedia article. I, for one, look forward to the day when we all can have all our problems solved by destroying the universe. [] http://en.wikipedia.org/wiki/Quantum_suicide_and_immortality
Re: O(n) Sorting Algorithm: Quantum Bogosort
#10Some programmers on 4chan came up with a "Sleep sort" algorithm and then proceeded to optimize it, complete with example code: http://dis.4chan.org/read/prog/1295544154 It essentially spawns a new thread for every item in the array, sleeps for an amount of time that scales with the item's value, and then prints out that item. So it's O(n + timeScale * $biggest_input) Pretty funny / entertaining if taken lightly :P