leetcode 17. Letter Combinations of a Phone Number
来源:互联网 发布:c语言文件读写函数 编辑:程序博客网 时间:2024/06/05 12:00
class Solution {public:vector<string> letterCombinations(string digits) {vector<string> res;if (digits.empty()){return res;}vector<string>table{ "0","1","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz" };res.push_back("");for (int i = 0; i < digits.size(); i++){vector<string> temp;for (auto a: table[digits[i] - '0']){for (auto b: res){temp.push_back(b + a);}}res = temp;}return res;}};
0 0
- LeetCode: Letter Combinations of a Phone Number
- LeetCode Letter Combinations of a Phone Number
- LeetCode: Letter Combinations of a Phone Number
- [Leetcode] Letter Combinations of a Phone Number
- [LeetCode] Letter Combinations of a Phone Number
- 【leetcode】Letter Combinations of a Phone Number
- LeetCode: Letter Combinations of a Phone Number
- [LeetCode]Letter Combinations of a Phone Number
- LeetCode-Letter Combinations of a Phone Number
- [LeetCode] Letter Combinations of a Phone Number
- LeetCode - Letter Combinations of a Phone Number
- LeetCode:Letter Combinations of a Phone Number
- LeetCode | Letter Combinations of a Phone Number
- leetcode Letter Combinations of a Phone Number
- Leetcode: Letter Combinations of a Phone Number
- 【leetcode】Letter Combinations of a Phone Number
- [LeetCode] Letter Combinations of a Phone Number
- leetcode: Letter Combinations of a Phone Number
- HDU2002
- str() 字符串的常用函数『移除空白 分割 长度 索引 切片』
- HDU2001
- SQL中的关联更新和关联删除
- HDU2000
- leetcode 17. Letter Combinations of a Phone Number
- BZOJ 1086: [SCOI2005]王室联邦 树分块,贪心DFS
- Charm Bracelet POJ - 3624
- Compressed Format For Linux
- 菜鸟入门 imagebutton的缩放问题
- c++自制小游戏(5th)kbhit,sleep和文件操作
- 8.1构造函数的分类及调用
- SQL关键字转换大写核心算法实现
- c# ADO操作