Shuffling

Fisher-Yates/Knuth

Randomly picks integers to swap elements in an ubiased manner.

Time Complexity: O(n)

Space Complexity: O(n)n

Pseudocode: http://http://rosettacode.org/wiki/Knuth_shuffle

algorithms.shuffling.knuth.shuffle(seq)[source]

Takes a list of integers and randomly swaps the elements in an unbiased manner.

Parameters:seq – A list of integers
Return type:A list of shuffled integers