码迷,mamicode.com
首页 >  
搜索关键字:combinations    ( 963个结果
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 telepho
分类:其他好文   时间:2016-03-14 18:51:51    阅读次数:165
LeetCode(17) - Letter Combinations of a Phone Number
经典的backtracking(回溯算法)的题目。当一个题目,存在各种满足条件的组合,并且需要把它们全部列出来时,就可以考虑backtracking了。当然,backtracking在一定程度上属于穷举,所以当数据特别大的时候,不合适。而对于那些题目,可能就需要通过动态规划来完成。 这道题的思路很简
分类:其他好文   时间:2016-03-13 12:49:11    阅读次数:127
[LeetCode]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 
分类:其他好文   时间:2016-03-10 14:20:11    阅读次数:155
[LeetCode]Combination Sum II
题目描述: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Ea
分类:其他好文   时间:2016-03-10 14:11:40    阅读次数:146
<LeetCode OJ> 77. Combinations
Total Accepted: 69360 Total Submissions: 206274 Difficulty: Medium Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example, If n = 4 and k =...
分类:其他好文   时间:2016-03-09 16:10:11    阅读次数:205
[LeetCode]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
分类:其他好文   时间:2016-03-09 00:06:15    阅读次数:258
39. Combination Sum
1. 每个元素可用多次 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
分类:其他好文   时间:2016-03-05 19:00:31    阅读次数:183
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 ["
分类:其他好文   时间:2016-03-02 15:05:51    阅读次数:144
Letter Combinations of a Phone Number
遍历所有的可能。 1 class Solution { 2 private: 3 vector<string> res; 4 map<char,string> num; 5 public: 6 void initial() 7 { 8 9 num['2']="abc"; 10 num['3']="d
分类:其他好文   时间:2016-03-01 20:52:16    阅读次数:184
22. 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: "
分类:其他好文   时间:2016-03-01 00:43:39    阅读次数:150
963条   上一页 1 ... 35 36 37 38 39 ... 97 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!