算法导论
文章目录
【注意】最后更新于 October 11, 2019,文中内容可能已过时,请谨慎使用。
这里没有告诉答案是什么?问题就这些 可以j
回溯法
题目1 把皇后问题 –已经解决
题目 2 Subset Sum –正在解决
Let’s consider a more complicated problem, called SubsetSum:
Given a set X of positive integers and target integer T, is there a subset of elements in X that add up to T?
Notice that there can be more than one such subset. For example,
if X = {8, 6,7, 5, 3, 10, 9} and T = 15, the answer is True,
because the subsets {8, 7} and {7, 5, 3} and {6, 9} and {5, 10} all sum to 15.
On the other hand, if X = {11, 6, 5,1, 7,13, 12} and T = 15, the answer is False
塔山
[1] https://zhuanlan.zhihu.com/p/37822898 [不懂]
https://leetcode-cn.com/problems/partition-equal-subset-sum/ [不懂]
[2] https://blog.cloudops.ml/Solve-problem-of-subset-sum-with-backtracking-method.html [不懂]
[3] https://www.lintcode.com/problem/target-sum/description[不懂]
[6] https://leetcode-cn.com/problems/partition-equal-subset-sum/solution/dfshui-su-chao-guo-100-by-ao-bo-man-shan-gu/ [没有解决该问题,如果全部相同排序也没用,舍去]
[8] https://leetcode-cn.com/problems/partition-equal-subset-sum/solution/fen-ge-deng-he-zi-ji-hui-su-he-dong-tai-gui-hua-ji/ [不是回溯法社区]
[9] https://github.com/wisdompeak/LeetCode/tree/master/DFS/698.Partition-to-K-Equal-Sum-Subsets [没有解决该问题,第一次计算就不正确 舍去]
[10] https://www.youtube.com/watch?v=5gpIN9Yf7C4&t=312s Two Solutions: backtracking and dynamic programming. ok
[11] https://www.cnblogs.com/graphics/archive/2011/07/14/2105195.html
https://www.jianshu.com/p/4652785460b8 【这个是回溯法,但是没有全部遍历】
[12] http://summerisgreen.com/blog/2017-07-07-2017-07-07-%E7%AE%97%E6%B3%95%E6%8A%80%E5%B7%A7-backtracking.html 【看不懂舍去】
【13】 https://leetcode-cn.com/problems/combination-sum-ii/solution/hui-su-suan-fa-jian-zhi-python-dai-ma-java-dai-m-3/ [感觉这个可以,正在看]