Logo

Question preview

Candied distribution

What this preview is

About this preview

Candied distribution is a easy quant interview question on puzzles.

Unlock full access to getcracked

Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.

What this combinatorics puzzle tests

This is an easy combinatorics problem that probes your ability to translate a real-world constraint into a counting formula. It appears frequently in quant interview loops because it rewards clear thinking about how constraints reduce the solution space—a skill that transfers directly to risk problems and constraint-satisfaction challenges in trading and research.

The core challenge is recognizing that the constraint (every child must receive at least one candy) changes the problem structure. Candidates who solve this cleanly typically reframe the problem to remove the constraint, then count the valid arrangements. The answer is a closed-form function of n that most people can derive in under two minutes once they spot the right angle.

  • Stars-and-bars counting with and without constraints
  • Change of variables to simplify constraint satisfaction
  • Closed-form vs. recursive formulations