Find Binomial Coefficient for 7C5 using dynamic programming approach. Also explain the relevant complexity.
As for the computing of nCk we need to compute k previous coefficients nCj, and all n coefficients n-1Cj, and n-1 coefficients n-2Cj, the overall complexity of the algorithm is O(n2)
Comments
Leave a comment