17. Letter Combinations of a Phone Number

public class Solution {
    public List letterCombinations(String digits) {
        LinkedList ans = new LinkedList();
        if (digits.length()==0) return ans;
        String[] mapping = new String[] {"0", "1", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};
        ans.add("");
        for(int i =0; i

你可能感兴趣的:(17. Letter Combinations of a Phone Number)