Dynamic Programming is a methodology by which we can divide or break the program into the number of the modules.The approached of the modular programming is mainly successful in these approaches of programming:-
(1)Overlapping Sub-Problems
(2)Optimal Substructure
(1)Overlapping Sub-Problems
(2)Optimal Substructure
Overlapping Sub-Problems
These are the problems in which the problem is divided into the sub-problems which can be used many types or mainly the problems in which the recursive function is used.
"Recursive functions are the function in which the function calling itself"
The example of the Overlapping sub -problem can be the problem of the Fibonacci sequence.
Optimal Substructure
These are the problems in which there is approach to find the optimal solution of the problem.The optimal solution refers to the finding the best possible solution of the problem. The example that can be taken is the Shortest Path Algorithm in which we try to find out the best possible shortest path out of the many possible solutions.
No comments:
Post a Comment