Prove an Incremental Shuffle Is Uniform
Company: Modal
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
Overview: Prove that the forward Fisher-Yates shuffle produces every permutation of distinct elements with probability 1/n factorial. Use an induction invariant over the shuffled prefix and explain how endpoint mistakes or modulo-biased randomness break uniformity.