Dynamic Programming Approach Algorithm And Pseudocode Difference