17 Letter Combinations of a Phone Number(medium)

 

Given a digit string, 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.

Input:Digit string "23"
Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].

 

给定一个数字字符串,返回数字可能表示的所有可能的字母组合。

数字到字母的映射(就像电话按钮一样)在下面给出。

 

posted @ 2017-11-06 16:44  WegYcx  阅读(113)  评论(0编辑  收藏  举报