❔ Shuffling Table Values
I'm creating a method that will take in the values of a table and then randomly shuffle them into different indexes of a new table using a for loop, how would I go about doing this?
5 Replies
I've made adjustments but the shuffled array has repeating numbers, and not every number from the input array is present in the newly shuffled array
![](https://utfs.io/f/ad6aa654-f051-4f25-ad28-deddf5ed218f-1nq2cb.png)
Well,
rnd.Next(0, shuffled.Length)
can generate repeating numbers
Look into Fischer-Yates algorithmUnknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.