Medium
Quiz
#17 Letter Combinations of a Phone Number
APPROACH
Digits 2 through 9 each map to a set of letters as on a telephone keypad (digit 1 maps to nothing). Given a digit string, return all possible letter strings it could represent in any order.
Example 1:
Input: digits = "23"
Output: ["ad","ae","af","bd","be","bf","cd","ce","cf"]
Example 2:
Input: digits = "2"
Output: ["a","b","c"]
1 of 4
1:00
What is the optimal approach for this problem?