How to SHUFFLE AN ARRAY in 4 minutes! ๐
31K views on YouTube
“The FisherโYates shuffle is an algorithm for shuffling a finite sequence. The algorithm takes a list of all the elements of the sequence, and continually determines the next element in the shuffled sequence by randomly drawing an element from the list until no elements remain. The algorithm produces an unbiased permutation: every permutation is equally likely. The modern version of the algorithm takes time proportional to the number of items being shuffled and shuffles them in place.”
– Eberl, Manuel (2016). “FisherโYates shuffle”. Archive of Formal Proofs. Retrieved 28 September 2023.