@@ -0,0 +1,1556 @@
+package leetcode.letter_combinations_of_a_phone_number;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0A%0Apublic class Solution %7B%0A%09%0A%09public ArrayList%3CString%3E dfs(HashMap%3CCharacter, char%5B%5D%3E digitMap, char%5B%5D str, int depth, int size, StringBuilder sb)%7B%0A%09%09ArrayList%3CString%3E ans = new ArrayList%3CString%3E();%0A%09%09if(depth == size)%7B%0A%09%09%09ans.add(sb.toString());%0A%09%09%09return ans;%0A%09%09%7Delse%7B%0A%09%09%09if(str%5Bdepth%5D == '1')%7B%0A%09%09%09%09ans.addAll(dfs(digitMap, str, depth + 1, size, sb));%0A%09%09%09%7Delse%7B%0A%09%09%09%09for(char c : digitMap.get(str%5Bdepth%5D))%7B%0A%09%09%09%09%09sb.append(c);%0A%09%09%09%09%09ans.addAll(dfs(digitMap, str, depth + 1, size, sb));%0A%09%09%09%09%09sb.deleteCharAt(sb.length() - 1);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return ans;%0A%09%7D%0A%09%0A    public ArrayList%3CString%3E letterCombinations(String digits) %7B%0A        HashMap%3CCharacter, char%5B%5D%3E digitMap = new HashMap%3CCharacter, char%5B%5D%3E();%0A        digitMap.put('0', %22 %22.toCharArray());%0A        digitMap.put('1', %22%22.toCharArray());%0A        digitMap.put('2', %22abc%22.toCharArray());%0A        digitMap.put('3', %22def%22.toCharArray());%0A        digitMap.put('4', %22ghi%22.toCharArray());%0A        digitMap.put('5', %22jkl%22.toCharArray());%0A        digitMap.put('6', %22mno%22.toCharArray());%0A        digitMap.put('7', %22pqrs%22.toCharArray());%0A        digitMap.put('8', %22tuv%22.toCharArray());%0A        digitMap.put('9', %22wxyz%22.toCharArray());%0A        %0A        return dfs(digitMap, digits.toCharArray(), 0, digits.length(), new StringBuilder());%0A    %7D%0A    %0A    public static void main(String%5B%5D args)%7B%0A    %09for(String s : new Solution().letterCombinations(%22234012%22))%7B%0A    %09%09System.err.println(s);%0A    %09%7D%0A    %7D%0A%7D%0A

Add java solution for 17. Letter Combinations of a Phone Number