A set of \(N\) distinct items can be arranged in \(N!\) different ways. We wish to write a computer program that shuffles the items randomly. Here are two candidates:
Code 1
1 2 3 

Code 2
1 2 3 

Which of these codes, if any, will produce all \(N!\) possible arrangements with equal probabilities?
Problem Loading...
Note Loading...
Set Loading...