@@ -0,0 +1,1728 @@
+package me.wayne.leetcodetop100.backtracking;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0A/**%0A * %E7%BB%99%E5%AE%9A%E4%B8%80%E4%B8%AA%E4%BB%85%E5%8C%85%E5%90%AB%E6%95%B0%E5%AD%972-9%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2%EF%BC%8C%E8%BF%94%E5%9B%9E%E6%89%80%E6%9C%89%E5%AE%83%E8%83%BD%E8%A1%A8%E7%A4%BA%E7%9A%84%E5%AD%97%E6%AF%8D%E7%BB%84%E5%90%88%E3%80%82%E7%AD%94%E6%A1%88%E5%8F%AF%E4%BB%A5%E6%8C%89 %E4%BB%BB%E6%84%8F%E9%A1%BA%E5%BA%8F %E8%BF%94%E5%9B%9E%E3%80%82%0A * %E7%BB%99%E5%87%BA%E6%95%B0%E5%AD%97%E5%88%B0%E5%AD%97%E6%AF%8D%E7%9A%84%E6%98%A0%E5%B0%84%E5%A6%82%E4%B8%8B%EF%BC%88%E4%B8%8E%E7%94%B5%E8%AF%9D%E6%8C%89%E9%94%AE%E7%9B%B8%E5%90%8C%EF%BC%89%E3%80%82%E6%B3%A8%E6%84%8F 1 %E4%B8%8D%E5%AF%B9%E5%BA%94%E4%BB%BB%E4%BD%95%E5%AD%97%E6%AF%8D%E3%80%82%0A * %E8%BE%93%E5%85%A5%EF%BC%9Adigits = %2223%22%0A * %E8%BE%93%E5%87%BA%EF%BC%9A%5B%22ad%22,%22ae%22,%22af%22,%22bd%22,%22be%22,%22bf%22,%22cd%22,%22ce%22,%22cf%22%5D%0A * %3Cp%3E%0A * https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/%0A */%0Apublic class LC17_LetterCombinations %7B%0A    public List%3CString%3E letterCombinations(String digits) %7B%0A        List%3CString%3E res = new ArrayList%3C%3E();%0A        if (digits == null %7C%7C digits.length() == 0) %7B%0A            return res;%0A        %7D%0A%0A        Map%3CCharacter, String%3E digitToLetterMap = new HashMap%3C%3E();%0A        digitToLetterMap.put('2', %22abc%22);%0A        digitToLetterMap.put('3', %22def%22);%0A        digitToLetterMap.put('4', %22ghi%22);%0A        digitToLetterMap.put('5', %22jkl%22);%0A        digitToLetterMap.put('6', %22mno%22);%0A        digitToLetterMap.put('7', %22pqrs%22);%0A        digitToLetterMap.put('8', %22tuv%22);%0A        digitToLetterMap.put('9', %22wxyz%22);%0A%0A        StringBuilder path = new StringBuilder();%0A        //%E9%80%92%E5%BD%92%0A        backTracking(path, digitToLetterMap, digits, 0, res);%0A        return res;%0A    %7D%0A%0A    private void backTracking(StringBuilder path, Map%3CCharacter, String%3E map, String digits,%0A            int dept, List%3CString%3E res) %7B%0A        if (digits.length() == dept) %7B%0A            res.add(path.toString());%0A            return;%0A        %7D%0A%0A        char digit = digits.charAt(dept);%0A        String letters = map.get(digit);%0A        for (int i = 0; i %3C letters.length(); i++) %7B%0A            path.append(letters.charAt(i));%0A            backTracking(path, map, digits, dept + 1, res);%0A            path.deleteCharAt(dept);%0A        %7D%0A    %7D%0A%7D%0A

add LC17_LetterCombinations