码迷,mamicode.com
首页 >  
搜索关键字:combinations    ( 963个结果
2015.04.01 Leetcode Generate Parentheses
LeetCode - Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()()" 题解: 需要用dfs -backtracking. 给定的n为括号对,也就是有n个...
分类:其他好文   时间:2015-04-02 13:30:32    阅读次数:158
No.22 Generate Parentheses
No.22 Generate ParenthesesGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3,...
分类:其他好文   时间:2015-04-01 17:21:55    阅读次数:97
[LeetCode] Restore IP Addresses
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2...
分类:其他好文   时间:2015-04-01 15:10:21    阅读次数:118
Generate Parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()()...
分类:其他好文   时间:2015-04-01 11:25:47    阅读次数:110
[*leetcode 17] 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-04-01 00:06:37    阅读次数:119
[LeetCode 77] Combinations
题目链接:combinations 相似题型: 1.  [LeetCode 39&40] Combination Sum I & II 2. [LeetCode 78] Subsets 3.  [LeetCode 90] Subsets II 4. [LeetCode 22] Generate Parentheses import java.util.A...
分类:其他好文   时间:2015-03-29 15:09:43    阅读次数:153
Restore IP Addresses
Restore IP Addresses Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "25525511135", return ["255.255.11.135", ...
分类:其他好文   时间:2015-03-28 23:20:39    阅读次数:416
[LeetCode 22] Generate Parentheses
题目链接:generate-parentheses import java.util.ArrayList; import java.util.List; /** * Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. ...
分类:其他好文   时间:2015-03-28 08:49:39    阅读次数:105
[LeetCode] Combinations 回溯
Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2,3],...
分类:其他好文   时间:2015-03-22 00:28:37    阅读次数:130
LeetCode—**Combination Sum 利用DFS算法
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited numb...
分类:编程语言   时间:2015-03-21 17:10:57    阅读次数:193
963条   上一页 1 ... 60 61 62 63 64 ... 97 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!