Parentheses Generator

From InterviewBit Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses of length 2*n.For example, given n = 3, a solution set is:”((()))”, “(()())”, “(())()”, “()(())”, “()()()” Make sure the returned list of strings are sorted. Solution / Approach Basically, for each character you can insert “(” or “)”. You needLanjutkan membaca “Parentheses Generator”