LeetCode第17题:电话号码的字母组合(JAVA实现)

题目:

LeetCode第17题:电话号码的字母组合(JAVA实现)_第1张图片

我的解答:

public static List letterCombinations(String digits) {
		 HashMap map=new HashMap<>();
		 map.put(2, new String[]{"a","b","c"});
		 map.put(3, new String[]{"d","e","f"});
		 map.put(4, new String[]{"g","h","i"});
		 map.put(5, new String[]{"j","k","l"});
		 map.put(6, new String[]{"m","n","o"});
		 map.put(7, new String[]{"p","q","r","s"});
		 map.put(8, new String[]{"t","u","v"});
		 map.put(9, new String[]{"w","x","y","z"});
		 int len=digits.length();
		 List res=new ArrayList<>();
		 for(int i=0;i list_tmp=new ArrayList<>();
			 if(i!=0) {
				 for(int j=0;j

 

你可能感兴趣的:(LeetCode习题集,LeetCode习题集)