Dsa
Recursion
Medium
Generate Parentheses Combinations
Given a number n, generate all combinations of well-formed parentheses of length 2n. The output should be a list of strings, where each string is a valid combination of parentheses.
Example Input:
3
Example Output:
(())()
(()())
()(())
()()()
Key concepts
recursionbacktrackingcombinatorics
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now