Given n pairs of parentheses, generate all combinations of well-formed parentheses. Example: n = . Output: ["((()))","(()())","(())()","()(())","()()()"]. Well-formed means every opening has a matching closing in the correct order. For n pairs, there are valid combinations (Catalan number).
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/maang-interview-prep/backtracking/problem-generate-parentheses
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████████████████████████████████████████████████████████████████████████████████