Skip to content

#17 - Letter Combinations of a Phone Number

MediumBacktracking
Open on LeetCode

Given a string containing digits from 2-9, return all possible letter combinations that the number could represent (phone keypad mapping). Return the answer in any order.

InputOutput
digits = "23"["ad","ae","af","bd","be","bf","cd","ce","cf"]
digits = ""[]
digits = "2"["a","b","c"]

Released under the MIT License.