How can one start solving Dynamic Programming problems? By memoizing the return value of fib(x) at index x of an array, reduce the number of recursive calls at the next step when fib(x) has already been called. By dependent, I mean to solve one sub-problem you need the answer of other sub-problems. The key here is that you can keep track of the root of the area instead of the actual area, using dynamic programming. See the code below for more understanding. For example, A and C have subsets which add up to 7 (f7gand f5,2grespectively), but B and D do not. The general recursive solution of the problem is to generate all subsequences of both given sequences and find the longest matching subsequence. The recursive approach has been discussed over here.Given below is the recursive code to find the N-th term: edit This post attempts to look at the dynamic programming approach to solve those problems. Dynamic Programming Practice Problems. Given below is the recursive solution to the LCS problem: Considering the above implementation, the following is a partial recursion tree for input strings âAXYTâ and âAYZXâ. General C++ Programming; 2d dynamic array. The key to figure, if a problem can be solved by DP, comes by practice. Complete reference to competitive programming. @PhamTrung, TSP can't be solved with dynamic programming and bitmask :-) – aioobe Aug 20 '14 at 15:39 @aioobe actually it is, you can represent the state by dp[1<