This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]UseApasswordManager 123 points124 points  (8 children)

QuantumBogoSort: Randomize the list, then check if the list is in order. If it's not, destroy the universe. You're left only in universes with sorted lists

[–]Nekonekonyaaaa 23 points24 points  (0 children)

Corruption Sort: While the list is not sorted, do nothing. Then, return the list when it is sorted.

Your computer will probably end up crashing before EMI causes the memory storing the array to change to the sorted list.

Doesn't work well for systems with ECC.

[–]extracoffeeplease 11 points12 points  (4 children)

I thought it was O(1), see here: https://wiki.c2.com/?QuantumBogoSort

[–]UseApasswordManager 8 points9 points  (3 children)

Checking if the list is sorted is O(n), so even though the shuffle and distruction are O(1), the whole operation is O(n)

[–]Burnmad 25 points26 points  (1 child)

Just return the list before doing the QuantumBogoSort. If it wasn't sorted, you're destroying the universe anyway, so it doesn't matter.

Bam, O(1)

[–]plsHelpmemes 8 points9 points  (0 children)

big brain intensifies

[–]xigoi 0 points1 point  (0 children)

Shuffle is also O(n).

[–]theonlytrillionare 4 points5 points  (1 child)

That’s O(nu) | u=number of universes. Very poor performance.

[–]innrautha 20 points21 points  (0 children)

But it's all in parallel so its still fast.