Binomial Coefficient
Return the number of ways to pick k items out of n different items when order does not matter (n choose k). Do not use math.comb.
Example 1
n 5
k 2
returns 10
10 ways.
Example 2
n 4
k 0
returns 1
Exactly one way: pick nothing.
Constraints
0 <= k <= n <= 30
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.