@@ -0,0 +1,1030 @@
+import java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class LC784LetterCasePermutation %7B%0A    private List%3CString%3E result = new ArrayList%3C%3E();%0A%0A    public List%3CString%3E letterCasePermutation(String S) %7B%0A        if (S.length() == 0) %7B%0A            result.add(%22%22);%0A            return result;%0A        %7D%0A%0A        doDFS(S, 0, %22%22);%0A%0A        return result;%0A    %7D%0A%0A    private void doDFS(String S, int currIndex, String currString) %7B%0A        if (currIndex == S.length()) %7B%0A            result.add(currString);%0A            return;%0A        %7D%0A%0A        char currChar = S.charAt(currIndex);%0A        if (Character.isDigit(currChar)) %7B%0A            String nextString = currString + currChar;%0A            doDFS(S, currIndex+1, nextString);%0A        %7D else %7B%0A            String nextLowerString = currString + Character.toLowerCase(currChar);%0A            doDFS(S, currIndex+1, nextLowerString);%0A%0A            String nextUpperString = currString + Character.toUpperCase(currChar);%0A            doDFS(S, currIndex+1, nextUpperString);%0A        %7D%0A    %7D%0A%7D%0A

Add Letter Case Permutation