The only difference between dynamic programming and back tracking is DP allows overlapping of sub problems. (fib(n) = fib(n-1)+ fib (n-2)).
Chat with our AI personalities
A greedy algorithm is similar to a dynamic programming algorithm, but the difference is that solutions to the subproblems do not have to be known at each stage; instead a "greedy" choice can be made of what looks best for the moment.
Both are using Optimal substructure , that is if an optimal solution to the problem contains optimal solutions to the sub-problems
well the static energy is the strength that resides in your body when you're not moving but dynamic energy is that the one occurs when you moving like swimming
The size or length of the list. For static, the size is a constant, while the size of a dynamic list may change over time. The 7 weekdays is static (in size/length, though the content is static as well), while the questions and answers at answers.com are 2 dynamic lists (the sizes are not constants, although just growing)
Dynamic programming enables you to develop sub solutions of a large program.the sub solutions are easier to maintain use and debug.And they possess overlapping also that means we can reuse them.these sub solutions are optimal solutions for the problem