@@ -0,0 +1,580 @@
+class Solution(object):%0A    def generateParenthesis(self, n):%0A        %22%22%22%0A        :type n: int%0A        :rtype: List%5Bstr%5D%0A        %22%22%22%0A        def recur(result, string, left, right):%0A            if left == 0 and right == 0:%0A                result.append(string)%0A                return%0A            if left %3E 0:%0A                recur(result, string + '(', left - 1, right)%0A            if right %3E left:%0A                recur(result, string + ')', left, right - 1)%0A%0A        result = %5B%5D%0A        recur(result, '', n, n)%0A        return result%0A%0An = 3%0Aprint Solution().generateParenthesis(n)

完成了第22题:Generate Parentheses