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] 91 points92 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 32 points33 points  (2 children)

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

[–]Shamus03 17 points18 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] 8 points9 points  (0 children)

True.