Problem · String
Letter Combinations of a Phone Number
Learn this problemProblem statement
Digits 2 through 9 map to letters as on a telephone keypad. Return every string formed by choosing one mapped letter for each input digit.
Return an empty list for an empty input, and otherwise return combinations in lexicographic keypad order.
Function
letterCombinations(digits: String) → String[]Examples
Example 1
digits = "23"return = ["ad","ae","af","bd","be","bf","cd","ce","cf"]Choose one of abc for 2 and one of def for 3.
Constraints
0 <= digits.length <= 8- Every character is between
2and9.
More Atlassian problems
- Planning ProductionOA · Seen Feb 2025
- K-Means ClusteringOA · Seen Feb 2025
- Minimum Sorted Erasure OperationsOA · Seen Jun 2024
- Count Analogous ArraysOA · Seen Mar 2024
- Get Maximum ScoreOA · Seen Mar 2024
- Better Compression 🦀OA · Seen Mar 2024
- Romanizer 🐡OA · Seen Mar 2024
- Flower Bouquets 💐OA · Seen Mar 2024