Source: wikibot/fisher-yates-shuffle
= Fisher–Yates shuffle
{wiki=Fisher–Yates_shuffle}
The Fisher–Yates shuffle, also known as the Knuth shuffle, is an algorithm used for generating a random permutation of a finite sequence—in simpler terms, it shuffles the elements of an array or list. The algorithm ensures that each permutation is equally likely, meaning it produces a uniform distribution of permutations.