算法导论
文章目录
【注意】最后更新于 October 10, 2019,文中内容可能已过时,请谨慎使用。
算法导论
递归
题目1 sort
题目2 Recursion Trees
回溯法
题目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
https://leetcode-cn.com/problems/partition-equal-subset-sum/
题目3 Longest Increasing Subsequence
Given an integer prev and an array A[1.. n], find the longest increasing subsequence of A in which every element is larger than prev.
https://leetcode-cn.com/problems/longest-increasing-subsequence/
Dynamic Programming
Longest Increasing Subsequence
Subset Sum