DFS+Backtracking
不刷脸皮要刷题
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Combination Sum I, II
public class Solution { public List> combinationSum(int[] candidates, int target) { if (candidates == null || candidates.length == 0) { return null; } Arrays.so转载 2014-11-11 23:48:00 · 275 阅读 · 0 评论 -
Letter Combinations of a Phone number
先把digit-letter建个Given a digit string, return all possible letter combinations that the number could represent.转载 2014-11-12 00:06:30 · 343 阅读 · 0 评论 -
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],]转载 2014-10-09 12:26:47 · 340 阅读 · 0 评论 -
Word Search
The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once.转载 2014-10-09 12:20:31 · 291 阅读 · 0 评论 -
Permutation I,II
还要有多典型的DFS + backtracking,之前写的乱七八糟凑出来的,后来用了这个si转载 2014-10-30 23:52:15 · 310 阅读 · 0 评论 -
Sudoku Solver
找到存在的解:DFS + Backtracking因为ji转载 2014-10-13 00:12:31 · 292 阅读 · 0 评论 -
Subsets I, II
DFS + BacktrackingII是考虑原set中有重复元素的情况Subset ISubset I转载 2014-10-19 21:02:17 · 365 阅读 · 0 评论
分享