Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

binomial coefficient python

def binomialCoef(n, k): 
    C = [0 for x in range(k+1)]
    C[0] = 1
    for i in range(n+1): 
        for j in range(min(i, k),0,-1):
            C[j] = C[j] + C[j-1]
    return C[k]
 
PREVIOUS NEXT
Tagged: #binomial #coefficient #python
ADD COMMENT
Topic
Name
7+6 =