Back to QuestionsPractice with This Question
Balanced Parentheses (Generative)
85.6K views•Asked at Google•
Medium
Question Explain
Given $n$ pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Use a Backtracking approach and track the counts of open and close brackets.
Start Trying This Question Simulation
Practice answering orally or with text to get instant AI feedback.