@@ -0,0 +1,1540 @@
+public class Solution %7B%0A    List%3CList%3CString%3E%3E map = new ArrayList%3CList%3CString%3E%3E();%0A    List%3CString%3E result = new ArrayList%3CString%3E();%0A    %0A    public List%3CString%3E letterCombinations(String digits) %7B%0A        if(digits.length() == 0)%7B%0A            return result;%0A        %7D%0A        genMap();%0A        addChar(%22%22, digits);%0A        return result;%0A    %7D%0A    %0A    private void genMap()%7B%0A        String%5B%5D num1 = %7B%22%22%7D;%0A        String%5B%5D num2 = %7B%22a%22, %22b%22, %22c%22%7D;%0A        String%5B%5D num3 = %7B%22d%22, %22e%22, %22f%22%7D;%0A        String%5B%5D num4 = %7B%22g%22, %22h%22, %22i%22%7D;%0A        String%5B%5D num5 = %7B%22j%22, %22k%22, %22l%22%7D;%0A        String%5B%5D num6 = %7B%22m%22, %22n%22, %22o%22%7D;%0A        String%5B%5D num7 = %7B%22p%22, %22q%22, %22r%22, %22s%22%7D;%0A        String%5B%5D num8 = %7B%22t%22, %22u%22, %22v%22%7D;%0A        String%5B%5D num9 = %7B%22w%22, %22x%22, %22y%22, %22z%22%7D;%0A        String%5B%5D num0 = %7B%22 %22%7D;%0A        %0A        map.add(0, Arrays.asList(num0));%0A        map.add(1, Arrays.asList(num1));%0A        map.add(2, Arrays.asList(num2));%0A        map.add(3, Arrays.asList(num3));%0A        map.add(4, Arrays.asList(num4));%0A        map.add(5, Arrays.asList(num5));%0A        map.add(6, Arrays.asList(num6));%0A        map.add(7, Arrays.asList(num7));%0A        map.add(8, Arrays.asList(num8));%0A        map.add(9, Arrays.asList(num9));%0A    %7D%0A    %0A    private void addChar(String cur, String digits)%7B%0A        if(digits.length() == 0)%7B%0A            result.add(cur);%0A        %7Delse%7B%0A            List%3CString%3E tmp = map.get(Integer.parseInt(digits.substring(0,1)));%0A            for(String str: tmp)%7B%0A                addChar(cur+str, digits.substring(1));%0A            %7D%0A        %7D%0A    %7D%0A%7D

Q17 Letter Combinations of a Phone Number