Showing posts with label shuffle. Show all posts
Showing posts with label shuffle. Show all posts

Dec 30, 2008

Given an integer n. Create an array of elements between 1..n in random order in the array. The probability of choosing a number for any position in th

Given an integer n. Create an array of elements between 1..n in random order in the array. The probability of choosing a number for any position in the array should be the same.
shuffling