Loading...
The Parentheses Factory
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- mid, senior
Problem
A code formatter needs to generate all possible valid combinations of balanced parentheses for a given pair count. Write a function that takes n pairs of parentheses and returns all well-formed combinations as a list of strings.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.