MCQOPTIONS
Saved Bookmarks
| 1. |
The recursive formula for Catalan number is given by Cn = Ci*C(n-i).Consider the following dynamic programming implementation for Catalan numbers. Which of the following lines completes the below code? |
| A. | Arr[i] = arr[j] * arr[k], |
| B. | Arr[j] += arr[i] * arr[k], |
| C. | Arr[i] += arr[j] * arr[k]. |
| D. | Arr[j] = arr[i] * arr[k], |
| Answer» D. Arr[j] = arr[i] * arr[k], | |