fisher yates Algorithm

A variant of the Fisher – Yates shuffle, known as Sattolo's algorithm, may be used to generate random cyclic permutations of length n instead of random permutations. The Fisher – Yates shuffle is named after Ronald Fisher and Frank Yates, who first described it, and is also known as the Knuth shuffle after Donald Knuth.

fisher yates source code, pseudocode and analysis