Which of the following implementations of Catalan numbers has the largest space complexity(Don't consider the stack space)?
Dynamic programming
Binomial coefficients
Recursion
All have equal space complexities
7 practice sets · Page 1 of 1
Which of the following implementations of Catalan numbers has the largest space complexity(Don't consider the stack space)?
Dynamic programming
Binomial coefficients
Recursion
All have equal space complexities
Which of the following implementations of Catalan numbers has the smallest time complexity?
Dynamic programming
Binomial coefficients
Recursion
All have equal time complexity
Which of the following lines completes the above code?
arr[i] = arr[j] * arr[k];
arr[j] += arr[i] * arr[k];
arr[i] += arr[j] * arr[k].
arr[j] = arr[i] * arr[k];
Which of the following methods can be used to find the nth Catalan number?
Recursion
Binomial coefficients
Dynamic programming
Recursion, Binomial Coefficients, Dynamic programming
Which of the following is not an application of Catalan Numbers?
Counting the number of Dyck words
Counting the number of expressions containing n pairs of parenthesis
Counting the number of ways in which a convex polygon can be cut into triangles by connecting vertices with straight lines
Creation of head and tail for a given number of tosses
Which of the following numbers is the 6th Catalan number?
14
429
132
42
Which of the following is NOT a Catalan number?
1
5
14
43