3 ms·
> If shuffling, look up a real algo (like Fisher-Yates for instance) and implement that. Or better yet, use a library implementation. If using a library implem
by toast0 4y ago
> If shuffling, look up a real algo (like Fisher-Yates for instance) and implement that. Or better yet, use a library implementation.
If using a library implementation, you do still need to validate that it's using a proper algorithm. And that it doesn't change to something else during an update. Which probably requires you to understand the algorithm, and looking at wikipedia, it's a handful of lines of code to do it right and know that it doesn't change because it's your code. Maybe not worth the time to inspect and reinspect from a library.