❔ 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
Well,
rnd.Next(0, shuffled.Length)
can generate repeating numbers
Look into Fischer-Yates algorithmUnknown User•2y 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.