https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/
思路:DFS、回溯(没有剪枝,解空间即为答案)
改进:字符串相加可以使用StringBuffer。
class Solution {
//两个大括号的方式初始化(本质上是匿名内部类 + 实例化代码块儿)
Map<String,String> hashMap=new HashMap<String,String>(){{
put("2","abc");
put("3","def");
put("4","ghi");
put("5","jkl");
put("6","mno");
put("7","pqrs");
put("8","tuv");
put("9","wxyz");
}};
public List<String> letterCo