題庫
00:00

12. Letter Combinations of a Phone Number

中等回溯法AmazonGoogle

Given a string containing digits from 2 to 9, return all possible letter combinations that the number could represent.

範例 1:

輸入: digits = "23"
輸出: ["ad","ae","af","bd","be","bf","cd","ce","cf"]

範例 2:

輸入: digits = ""
輸出: []

限制條件:

  • 0 <= digits.length <= 4
  • digits[i] is a digit from 2 to 9.
核心程式碼模式
● 已自動儲存第 1 行,第 1 欄