Search⌘ K
AI Features

Challenge: The Catalan Numbers

Explore how to compute Catalan numbers using bottom-up dynamic programming with tabulation. Learn to optimize recursion through an efficient bottom-up approach to solve this classical counting problem.

Problem statement

The Catalan numbers are a special sequence of numbers given by the following set of formulas:

C0=1C_0 = 1

Cn=i=0n1CiCn1iC_n = \sum_{i=0}^{n-1} C_iC_{n-1-i} ...