'why LCIS should be solved with dynamic programming design
I am reading the book "Introduction to Algorithm" and especially in the dynamic programming chapter i've learned these notes :
The second ingredient that an optimization problem must have for
dynamic programming to apply is that the space of subproblems must
be “small” in the sense that a recursive algorithm for the problem
solves the same subproblems over and over, rather than always generating
new subproblems
when i apply the dynamic programming design on the problem LCIS "Longest Increasing Common Subsequence " , I didn't figure out where is the overlapping of subproblems , (i understand that a brute force algorithm costs O(N * 2^m))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|