I was reading about dynamic programming and I understood that we should not be using dynamic programming approach if the optimal solution of a problem does not contain the optimal solution of the subproblem.The Longest path problem is very clear example on this and I understood why.But I am not able to find out any other problem which is similar to longest path problem, where the subproblems's solution cannot be used for solving the optimal solution of parent. Can some one guide me?
When not to use dynamic programming
dynamic programming