Showing posts with label Shuffling. Show all posts
Showing posts with label Shuffling. Show all posts

Wednesday, December 7, 2016

Shuffling

Following is an algorithm(Knuth Shuffle or Fisher-Yates Shuffle) to shuffle elements of an array in O(N).


Generic Version