Problems > Catalan Number > Editorial

Catalan Number — Solution & Editorial

Back to the Problem

Use the recurrence Ci+1 = Ci · 2(2i+1)/(i+2); the division is exact at each step.

Complexity: O(N)