1.

Which of the following is NOT a Catalan number?(a) 1(b) 5(c) 14(d) 43The question was asked in unit test.I'd like to ask this question from Catalan Number using Dynamic Programming in portion Dynamic Programming of Data Structures & Algorithms II

Answer»

Right choice is (d) 43

The explanation is: Catalan NUMBERS are given by: (2N!)/((n+1)!n!).

For n = 0, we get C0 = 1.

For n = 3, we get C3 = 5.

For n = 4, we get C4 = 14.

For n = 5, we get C3 = 42.



Discussion

No Comment Found

Related InterviewSolutions