
回溯法
文章平均质量分 83
Yadoer
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode-Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ["aa","原创 2015-02-09 20:28:12 · 1052 阅读 · 0 评论 -
回溯法-求全排列
回溯法入门,求一个集合的全排列,比如{2,3,5}的全排列为:[[2, 3, 5], [2, 5, 3], [3, 2, 5], [3, 5, 2], [5, 3, 2], [5, 2, 3]] 代码如下: public class AllPermutations { public void allPermutations(List> lists, Integer[] a, int cur)原创 2015-02-09 20:25:47 · 1498 阅读 · 0 评论 -
LeetCode-Word Break II
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s = "leetcode", dict = ["leet"原创 2015-03-13 20:56:46 · 1088 阅读 · 0 评论 -
LeetCode-Subsets(子集)
三种不同的方式,生产一个集合的所有子集,回溯法、迭代法。。。原创 2015-02-09 20:22:49 · 1130 阅读 · 0 评论