|
|
|
|
|
by terrabiped
536 days ago
|
|
Longest common subsequence for an arbitrary input is NP-hard: https://en.wikipedia.org/wiki/Longest_common_subsequence Some narrow versions of it could be optimally solved with DP, but when the constraints are lifted, you will probably have to pay for it with either exponential memory or time. Same applies to the Knapsack problem. You can solve some variants of it with DP, but it won't generalize. |
|