Difference Between Dynamic And Greedy Method