New Sorting Algo Just Dropped

New Sorting Algo Just Dropped
sorting-algorithms-memes, algorithm-memes, big-o-notation-memes, computer-science-memes, cosmic-rays-memes | ProgrammerHumor.io

Finally, a sorting algorithm that combines the efficiency of doing absolutely nothing with the reliability of quantum mechanics. Just sit there and wait for cosmic radiation to randomly flip bits in RAM until your array magically becomes sorted. Time complexity of O(∞) is technically accurate since you'll be waiting until the heat death of the universe, but hey, at least it only uses O(1) space. Your CPU will thank you for the vacation while it repeatedly checks if the array is sorted yet. Spoiler: it's not. It never will be. But somewhere in an infinite multiverse, there's a version of you whose array got sorted on the first try, and they're absolutely insufferable about it.

More Like This