public List<String> removeInvalidParentheses(String s) {
        Set<String> res = new HashSet<>();
        int rmL = 0, rmR = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '(') rmL++;
            if(s.charAt(i) == ')') {
                if(rmL != 0) rmL--;
                else rmR++;
            }
        }
        DFS(res, s, 0, rmL, rmR, 0, new StringBuilder());
        return new ArrayList<String>(res);
    }
Date 03/03/2016
@author Tushar Roy

Remove the minimum number of invalid parentheses in order to make the input string valid.
Return all possible results

Reference
https://leetcode.com/problems/remove-invalid-parentheses/
src/com/interview/recursion/RemoveInvalidParenthesis.java