15. Combinations

Easy

Use a combination when order does not matter:

(nr)=n!r!(nr)!\binom{n}{r} = \frac{n!}{r!(n-r)!}

Return the number of ways to choose r items from n.

solve(12, 3)  ->  220     # a 3-person team from 12

Sign in to write and run your own code.

Implement solve(...)