Greedy Approach Vs Dynamic Approach