Skip to content
RED SAG Skills
hard20 pts · first answer countsgame-architecturerandomness

Biased card shuffle

This shuffle swaps each position with any random position. Why is it biased?

for (let i = 0; i < n; i++) {
  const j = randInt(0, n - 1)
  swap(a, i, j)
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions