【LeetCode & 劍指offer刷題】回溯法與暴力列舉法題5:Letter Combinations of a Phone Number
阿新 • • 發佈:2019-01-06
【LeetCode & 劍指offer 刷題筆記】目錄(持續更新中...)
Letter Combinations of a Phone Number
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters.C++ //傳統手機數字盤的按鍵產生的所有可能字母組合 //感覺和回溯法沒有什麼關係,就是窮舉法 class Solution { public : vector < string > letterCombinations