Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Recursive function for the binomial coefficient
def rec_binom(n,k):
if (k == 0) or (n == k): return 1
else:
return binom(n-1, k) + binom(n-1, k-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.