⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 19s17 days 22 hours 19 minutes 19 seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 19s17 days 22 hours 19 minutes 19 seconds.

Sign in to watch this lesson
Algorithms - Recursion, Backtracking and Combinatorics · 4:08
How many ways can 10 identical shares be split across 4 desks? Lay the shares out as stars and cut the row with bars: every arrangement is one split, so the count is a binomial, C(n+k-1, k-1) (56 for 5 shares and 4 desks, 286 for 10 and 4). We extend it to equations, to boxes that must be non-empty (bars only in the gaps, C(n-1, k-1)), to minimums per box (hand them out first), and to disguises like non-decreasing sequences and three identical dice, whose 56 outcomes are not equally likely.