I was running a simulation for N games where I'm shuffling a set of K objects using the Fischer-Yates algorithm. When I consulted ChatGPT about it, it told me I couldn't re-shuffle an already shuffled deck. It suggested I copy the original array into a new one before passing it to the shuffle function, which seems inefficient to me. Is there really a significant mathematical difference, or am I overthinking this?
1 Answer
It'd help to see the code you're working with or the exact response from ChatGPT. Otherwise, we could just be guessing here.
You're right! So here's what I have: `int* CurrentPrizes = BasePrizes;` followed by a loop for shuffling. ChatGPT suggests I use a new array instead. Does that seem too redundant?