Is there a way to randomly sort an array using only a random boolean source?
For this question, I'm specifically excluding an approach whereby the booleans are just arranged into an integer and then it's used in a Fisher-Yates shuffle. I'd be interested in any algorithm than wasn't ridiculous i.e. with a stupid time complexity of something like 2^O(n).
Aucun commentaire:
Enregistrer un commentaire