You are given a string containing digits from 2-9 inclusive, find and return all possible letter combinations that the number could represent. Return the answer in any order.
A mapping of digits to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters.
2: "abc"3: "def"4: "ghi"5: "jkl"6: "mno"7: "pqrs"8: "tuv"9: "wxyz""23"
["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"]
Digit '2' maps to 'a', 'b', 'c'. Digit '3' maps to 'd', 'e', 'f'. Combining these, we get 'ad', 'ae', 'af', 'bd', 'be', 'bf', 'cd', 'ce', 'cf'.
""
[]
An empty input string results in an empty list of combinations.
"2"
["a", "b", "c"]
Digit '2' maps to 'a', 'b', 'c'.
"23"
["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"]