News for hackers. Stuff that matters.
Re:How We Learned to Cheat at Online Poker: A Study in Softw... by neckro23 on Monday July 20, 2015 @03:13PM (#9918311)
It's not mentioned by name in the article, but the "proper" way to do it is with a Fisher-Yates shuffle: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle

Depending on the array implentation, adding and removing elements is often an O(n) operation, which isn't terribly efficient. The Fisher-Yates method lets you get the same results without messing with the array length.

There are no comments on this comment yet.