Is a Greedy problem a recursive algorithm without overlapping sub-problems?

Hi Everyone,

I am new to Data Structures and Algorithms and was wondering about Greedy approach and Dynamic Programming(DP) approach. After a long struggle I seem to sort of grasp the step by step approach to solving a DP problem. However I seem to mis-understand problems which require a greedy approach to DP problems. By definition Greedy approach means we choose the best solution at every step and DP has overlapping sub problems.

The root of my confusion is that I solve a DP problem recursively first then look for overlapping sub-problems and use memoisation to improve the solution.

My question is that can I call recursive solution for a DP problem without memoisation a Greedy Solution. For example while solving the popular Knapsack problem we either choose to add an item to the Knapsack or not. We then choose the best possible outcome at every step. Now the Knapsack problem has overlapping sub problems and is a DP Problem. But my question is what if it didn't had overlapping sub problems. Can we call the recursive approach without memoisation a greedy approach for Knapsack problem?

Please help me out as I am a complete beginner and this has been bugging me for a while.

Thanks!

Comments (1)