Math Fundamentals18 sections · 814 units
Open in Course

Lessons from Shuffle

summary

Three key points:

1.1. Fair shuffling requires careful probability analysis. Naive random swaps create bias.

2.2. Fisher-Yates is the standard: linear time, in-place, and provably fair.

3.3. Each step reduces the pool of remaining elements by one, building the permutation left to right.