@@ -0,0 +1,796 @@
+package leetcode;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * https://oj.leetcode.com/problems/generate-parentheses/%0A */%0Apublic class Problem22 %7B%0A    public List%3CString%3E generateParenthesis(int n) %7B%0A        List%3CString%3E result = new ArrayList%3C%3E();%0A        if (n %3E 0) %7B%0A            generateParenthesis(n, 0, 0, %22%22, result);%0A        %7D%0A        return result;%0A    %7D%0A%0A    private void generateParenthesis(int n, int open, int close,%0A        String accu, List%3CString%3E result) %7B%0A        if (close == n) %7B%0A            result.add(accu);%0A            return;%0A        %7D%0A        if (open %3E close) %7B%0A            generateParenthesis(n, open, close+1, accu + %22)%22, result);%0A        %7D%0A        if (open %3C n) %7B%0A            generateParenthesis(n, open+1, close, accu + %22(%22, result);%0A        %7D%0A    %7D%0A%7D%0A

Solve problem 22