码迷,mamicode.com
首页 >  
搜索关键字:combinations    ( 963个结果
leetCode 93.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.255.11.135", "255.255.111.35"]. (Order...
分类:其他好文   时间:2015-07-27 11:12:45    阅读次数:645
给定一个set字符和一个正数k,找出所有该做set它可以由长度构成k该字符串集合 print-all-combinations-of-given-length
// 给定一个set字符和一个正数k,找出所有该做set它可以由长度构成k该字符串集合 /* Input: set[] = {'a', 'b'}, k = 3 Output: aaa aab aba abb baa bab bba bbb Input: set[] = {'a', 'b', ...
分类:其他好文   时间:2015-07-27 09:21:14    阅读次数:139
Combination Sum
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-07-26 20:36:39    阅读次数:82
LeetCode Letter Combinations of a Phone Number 电话号码组合
题意:给一个电话号码,要求返回所有在手机上按键的组合,组合必须由键盘上号码的下方的字母组成。思路:尼玛,一直RE,题意都不说0和1怎么办。DP解决。 1 class Solution { 2 public: 3 vector ans; 4 string str; 5 6 v...
分类:其他好文   时间:2015-07-26 17:05:54    阅读次数:97
Combination Sum
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-07-25 20:00:54    阅读次数:138
[leetcode] Generate Parentheses
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))...
分类:其他好文   时间:2015-07-23 09:22:36    阅读次数:110
【LeetCode-面试算法经典-Java实现】【022-Generate Parentheses(生成括号)】
【022-Generate Parentheses(生成括号)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题  Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.   For example, given n = 3...
分类:编程语言   时间:2015-07-23 08:15:55    阅读次数:137
[LeetCode] Letter Combinations of a Phone Number
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ...
分类:其他好文   时间:2015-07-22 18:00:14    阅读次数:91
leetCode 77.Combinations (组合)
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example, If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ]...
分类:其他好文   时间:2015-07-22 14:43:15    阅读次数:81
077 Combinations
077 Combinations这道题纯dfs, 但是在 Line 13处做了个剪枝 从84ms 提高到68 ms 1 class Solution: 2 def __init__(self): 3 self.ans = [] 4 5 def combine...
分类:其他好文   时间:2015-07-22 01:23:15    阅读次数:120
963条   上一页 1 ... 45 46 47 48 49 ... 97 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!