backtracking
文章平均质量分 58
sbicode
这个作者很懒,什么都没留下…
展开
-
LeetCode_10 Regular Expression Matching
This is the linkage to this problem: 点击打开链接Similar question: None by nowImplement regular expression matching with support for '.' and '*'. '.' Matches any single character.'*' Matches原创 2016-01-27 13:23:27 · 448 阅读 · 0 评论 -
LeetCode_78 Subsets
Link to original problem: 这里写链接内容 Given a set of distinct integers, nums, return all possible subsets.Note: Elements in a subset must be in non-descending order. The solution set must not contain du原创 2016-01-31 06:07:03 · 241 阅读 · 0 评论 -
LeetCode_77 Combinations
Link to original problem: 这里写链接内容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],原创 2016-01-31 06:02:18 · 262 阅读 · 0 评论 -
LeetCode_60 Permutation Sequence
Link to original problem: 这里写链接内容 The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order, We get the following sequence (ie, for n = 3原创 2016-01-31 05:30:02 · 252 阅读 · 0 评论 -
LeetCode_47 Permutations II
Link to original problem: 这里写链接内容Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example, [1,1,2] have the following unique permutations: [1,1原创 2016-01-31 05:03:13 · 345 阅读 · 0 评论 -
LeetCode_46 Permutations
Link to original problem: 这里写链接内容 Given a collection of distinct numbers, return all possible permutations.For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [原创 2016-01-31 04:55:50 · 355 阅读 · 0 评论 -
LeetCode_44 Wildcard Matching
Link to original problem: 这里写链接内容Implement wildcard pattern matching with support for ‘?’ and ‘*’.‘?’ Matches any single character. ‘*’ Matches any sequence of characters (including the empty sequence原创 2016-01-29 05:55:39 · 203 阅读 · 0 评论 -
LeetCode_40 Combination Sum II
Link to the original problem: 这里写链接内容 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.Each number in C may原创 2016-01-29 04:13:24 · 217 阅读 · 0 评论 -
LeetCode_39 Combination Sum
Original problem: 这里写链接内容 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 f原创 2016-01-29 03:55:26 · 220 阅读 · 0 评论 -
LeetCode_22 Generate Parentheses
Link to original problem: 这里写链接内容 Very typical backtracking problem, it can be simulated to give all the possible orders of n 0s and n 1s list. But we need to take care about that at every index of ea原创 2016-01-28 03:56:52 · 303 阅读 · 0 评论 -
LeetCode_37 Sudoku Solver
Original problem: 37 Sudoku Solver 这里写链接内容 Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character ‘.’. You may assume that there will be only原创 2016-01-29 03:40:51 · 252 阅读 · 0 评论 -
LeetCode_17 Letter Combinations of a Phone Number
Very typical backtracking problem.Here is the link to the original problem. 点击打开链接Related question: 22 Generate Parentheses 点击打开链接 and 39 Combination Sum 点击打开链接Given a digit string, return all原创 2016-01-28 03:19:18 · 221 阅读 · 0 评论 -
LeetCode_79 Word Search
Link to original problem: 这里写链接内容Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are thos原创 2016-01-31 06:13:51 · 225 阅读 · 0 评论