On a phone keypad each digit from 2 to 9 stands for letters: 2: abc, 3: def, 4: ghi, 5: jkl, 6: mno, 7: pqrs, 8: tuv, 9: wxyz. Given a string of such digits, return every string the digits could spell, in dictionary order. An empty string of digits gives an empty list.
For "23": ad, ae, af, bd, be, bf, cd, ce, cf.
Example 1
Input:
letter_combinations('23')
Output:
['ad', 'ae', 'af', 'bd', 'be', 'bf', 'cd', 'ce', 'cf']
Example 2
Input:
letter_combinations('')
Output:
[]
0 <= len(digits) <= 82 to 9.No results yet
Run your code to check it against the examples, or submit to run every test.