What is the purpose of the list C in the code below?
def binomial_coefficient(n, r): C = [0 for i in range(r + 1)]; C[0] = 1; for iinrange(1,n+1): j=min(i,r);whilej>0: C[j]+=C[j-1];j-=1; return C[r]
What is the purpose of the list C in the code below?
def binomial_coefficient(n, r): C = [0 for i in range(r + 1)]; C[0] = 1; for iinrange(1,n+1): j=min(i,r);whilej>0: C[j]+=C[j-1];j-=1; return C[r]
user