Solution: Generate Parentheses

Let's solve the Generate Parentheses problem using the Subsets pattern.

Statement

For a given number, n, generate all combinations of balanced parentheses.

Constraints:

  • 1≤1 \leq n ≤10\leq 10

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.