Soal
00:00

12. Letter Combinations of a Phone Number

SedangBacktrackingAmazonGoogle

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

Contoh 1:

Input: digits = "23"
Output: ["ad","ae","af","bd","be","bf","cd","ce","cf"]

Contoh 2:

Input: digits = ""
Output: []

Batasan:

  • 0 <= digits.length <= 4
  • digits[i] is a digit from 2 to 9.
Mode kode inti
● Tersimpan otomatisBaris 1, kolom 1