The Recursive Formula For Catalan Number Is Given By Cn Cicnibr #2120

The recursive formula for Catalan number is given by Cn = ∑Ci*C(n-i).<br /> Consider the following dynamic programming implementation for Catalan numbers:</p> <pre><code class="language-c"> #include<stdio.h> int cat_number(int n) { int i,j,arr[n],k; arr[0] = 1; for(i = 1; i < n; i++) { arr[i] = 0; for(j = 0,k = i - 1; j < i; j++,k--) ______________________; } return arr[n-1]; } int main() { int ans, n = 8; ans = cat_number(n); printf("%d\n",ans); return 0; }</code></pre> <p>Which of the following lines completes the above code?

Online Quiz This multiple choice question (MCQ) is related to the book/course gs gs122 Data Communication and Computer Network. It can also be found in gs gs122 Dynamic Programming - Catalan Number using Dynamic Programming - Quiz No.1.


Similar question(s) are as followings:



Online Quizzes of gs122 Data Communication and Computer Network

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background