Create a list of all possible question numbers and start to perform a standard Fisher-Yates shuffle on it. You can then stop after N steps and you will have N question numbers chosen perfectly at random (and the unchosen numbers sorted after that).
- tye (but my friends call me "Tye")In reply to (tye)Re: Creating an array of unique numbers
by tye
in thread Creating an array of unique numbers
by TStanley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |