Dice Maximum Interview Questions
How to solve dice maximum and minimum interview questions using cumulative counting, complements, expected values, and sanity checks.
Candidates practicing max/min finite probability prompts in quant interviews.
Use cumulative counts
For a maximum, the event max <= k means every die is at most k. For n fair dice, that probability is (k/6)^n. This is often cleaner than enumerating exact maximum outcomes directly.
Exact maximum
To get P(max = k), subtract P(max <= k - 1) from P(max <= k). For n dice, that is (k/6)^n - ((k - 1)/6)^n.
Concrete example
For two dice, P(max = 5) = P(max <= 5) - P(max <= 4) = 25/36 - 16/36 = 9/36 = 1/4.
Minimum questions mirror maximum
For a minimum, count min >= k, which means every die is at least k. Then subtract adjacent cumulative probabilities to get exact minimum values.
Expected maximum
Expected maximum can be computed from the distribution of the maximum or tail probabilities. In interviews, explain the distribution setup before jumping to formulas.
Common mistakes
Candidates often count only one die showing k and forget cases where several dice share the maximum. Cumulative counting avoids that trap.
Practice the pattern
Use the LeetQuidity curriculum and calibration to turn this topic into a focused practice plan.