LeetCode – Letter Combinations of a Phone Number (Java)

Given a digit string, return all possible letter combinations that the number could represent. (Check out your cellphone to see the mappings) Input:Digit string “23”, Output: [“ad”, “ae”, “af”, “bd”, “be”, “bf”, “cd”, “ce”, “cf”]. Java Solution 1 – DFS This problem can be solves by a typical DFS algorithm. DFS problems are very similar … Read more