01How it works
Shuffle the array uniformly at random, then check if it's sorted. If it is, return. If it isn't, destroy the current universe — leaving only the surviving branches in which the shuffle happened to land sorted. Strictly a thought experiment that requires the many-worlds interpretation of quantum mechanics to actually work.