public List<String> letterCombinations(String digits) {
String[][] numsList=new String[][] {
{"a", "b", "c"},
{"d", "e", "f"},
{"g", "h", "i"},
{"j", "k", "l"},
{"m", "n", "o"},
{"p", "q", "r", "s"},
{"t", "u", "v"},
{"w", "x", "y", "z"},
};
List<String> res=new ArrayList<>();
if(digits.length()==0) {
return res;
}
int first=digits.charAt(0)-48-2;
String[] current=numsList[first];
if(digits.length()==1) {
res.addAll(Arrays.asList(current));
return res;
}
List<String> leftList = letterCombinations(digits.substring(1));
for (String aCurrent : current) {
for (String str : leftList) {
res.add(aCurrent + str);
}
}
return res;
}