in

Sorting with O(n) efficiency

Sorting with O(n) efficiency | array-memes, sorting-memes | ProgrammerHumor.io
array-memes, sorting-memes | ProgrammerHumor.io

[text] According to quantum theory every possible universe exists so there is a universe where the array is already sorted. We can make use of this by destroying every universe where this is not the case. Efficiency 0n def issortedarray for i in rangelenarray1 if arrayi arrayil1 return False return True def quantumbogosortarray if issortedarray return array else destroyuniverse This is left as an exercise to the reader