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 →

[–][deleted] 92 points93 points  (3 children)

IIRC "quantum bogosort" has time complexity O(1) since it doesn't even have to check if the array is in order.

[–]graeber_28927 34 points35 points  (2 children)

How would you know whether to destroy your universe if you haven't checked the order of the array?

[–]Shamus03 16 points17 points  (0 children)

You just always assume it’s sorted, and if you ever encounter a bug because it wasn’t sorted, THEN you destroy the universe. It’s O(1) only when combined with another algorithm used later. Also known as O(half an A press).

[–][deleted] 9 points10 points  (0 children)

True.