๐ WAYPOINT LESSON
Checkpoint โ Catalan Counts
โญ beginnerโณ 40 min read๐ Lesson 176 of 281
Bracket counts graded from n = 1 to n = 500000; a wrong answer that reports the central binomial instead of Catalan is the graded failure.
Checkpoint โ Catalan. Line 1: q. Each line: n. Print the number of balanced sequences of n bracket pairs mod 1e9+7.
C_n = C(2n, n) - C(2n, n + 1) with factorial tables.