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.
Define a valid string in the context of parentheses.
Think about matching pairs.
Provide two examples of valid strings.
Focus on balanced pairs.
What is the definition of a valid parenthesis string?
Think about what makes a string valid!
True or False: The formula C(n) = ∑C(k)C(n-k-1) is a recurrence relation for Catalan numbers.
Recall the formation of the recurrence.
Create and describe a new problem related to valid parenthesis without violating the matching condition.
Think about restrictions on placement.
Propose an algorithm to count valid strings of n parenthesis using dynamic programming.
Look into how states can be represented.
4 more questions in this section. Enroll free to practise them all.
Enroll free