Remember, I said the loop you had was a shuffle. Both the Fisher-Yates and yours are examples of shuffle algorithms. As such, each element in the original data structure is copied exactly once into the result, in a random position.
So, yes, that would be the case with the Fisher-Yates algorithm.
In reply to Re^7: Choose random element of array?
by Somni
in thread Choose random element of array?
by McMahon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |