Dynamic Programming Approach Algorithm And Flowchart