标签:style blog http color java os strong io
题目:
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"].
Note:
Although the above answer is in lexicographical order, your answer could be in any order you want.
题解:
这道题也是来算一种combination的题,跟 Combinations 和 Word Break II 都比较类似(其实和leetcode里面很多题都相似)。
代码如下:
Refrence:http://rleetcode.blogspot.com/2014/02/letter-combinations-of-phone-number-java.html
Letter Combinations of a Phone Number leetcode java,布布扣,bubuko.com
Letter Combinations of a Phone Number leetcode java
标签:style blog http color java os strong io
原文地址:http://www.cnblogs.com/springfor/p/3879829.html