Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
How many valid strings can we form with 2 pairs of parentheses?
Draw out the pairs to visualize options.
If n equals 1, how many valid parenthesis strings are possible?
Consider what it takes to open and close a bracket.
How many valid strings can be formed with 3 pairs of parentheses?
Use the formula of Catalan numbers.
C(n) represents the number of valid parenthesis for n pairs. True or False?
Think about the scenarios imagined in class.
Prove that the nth Catalan number can be also expressed as C(2n, n)/(n+1).
Think combinatorically about choices of pairs in arrangements.
How many unique valid arrangements can you create with 5 pairs of parentheses?
You can calculate using the recurrence relation iteratively.
4 more questions in this section. Enroll free to practise them all.
Enroll free