码迷,mamicode.com
首页 >  
搜索关键字:combinations    ( 963个结果
resotreIpAddress
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return ["255...
分类:其他好文   时间:2015-11-26 12:33:32    阅读次数:127
leetcode Letter Combinations of a Phone Number python
class Solution(object): def letterCombinations(self, digits): """ :type digits: str :rtype: List[str] """ if len...
分类:编程语言   时间:2015-11-21 00:39:29    阅读次数:317
[?*]Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:其他好文   时间:2015-11-17 08:24:43    阅读次数:199
Combinations
1. TitleCombinations2. Http addresshttps://leetcode.com/problems/combinations/3. The questionGiven two integersnandk, return all possible combinations...
分类:其他好文   时间:2015-11-16 21:07:20    阅读次数:178
LeetCode 22 Generate Parentheses
翻译给定一个括号序列,写一个函数用于生成正确形式的括号组合。 例如,给定n = 3,一个解决方案集是: "((()))", "(()())", "(())()", "()(())", "()()()"原文Given n pairs of parentheses, write a function to generate all combinations of well-formed parenthe...
分类:其他好文   时间:2015-11-11 16:36:53    阅读次数:262
LeetCode OJ:Restore IP Addresses(存储IP地址)
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2...
分类:其他好文   时间:2015-11-10 17:50:56    阅读次数:243
Combination Sum - LeetCode
Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num...
分类:其他好文   时间:2015-11-10 15:47:45    阅读次数:161
lintcode 中等题:Letter Combinations of a Phone Number 电话号码的字母组合
题目电话号码的字母组合给一个数字字符串,每个数字代表一个字母,请返回其所有可能的字母组合。下图的手机按键图,就表示了每个数字可以代表的字母。样例给定"23"返回["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"]注意以上的答案是按照词典编撰顺序...
分类:其他好文   时间:2015-11-06 20:53:50    阅读次数:236
LeetCode Combinations (DFS)
题意: 产生从1~n的k个数的所有组合,按升序排列并返回。思路: DFS一遍即可解决。注意升序。 1 class Solution { 2 public: 3 vector> ans; 4 int nn, kk; 5 void DFS(vector& seq,int n,...
分类:其他好文   时间:2015-11-05 23:54:32    阅读次数:240
Generate Parentheses - LeetCode
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))...
分类:其他好文   时间:2015-10-30 07:06:46    阅读次数:174
963条   上一页 1 ... 39 40 41 42 43 ... 97 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!