Learn Dynamic Programming or if you are preparing for a interview then this repo will help you. This repo is made to solve all the problems students are facing while learning dynamic programming . Contributions and suggestions to make this repository the best are welcome.
DYNAMIC PROGRAMMING What-Enhanced version of Recursion. How to identify-To find that the problem can be solved using DP we can identify on the basis of two things:- 1)Choice is given to us in the problem like choose an item or not. 2)optimal solution is asked example maximum profit,minimum loss etc. How to solve and DP problem-- 1)Write a recursive function for the problem 2)Memoization 3)Top-down approach you can choose any method between 2 and 3 both have the same time complexity.
COUNT SUBSETS WITH GIVEN DIFF->
UNBOUNDED KNAPSACK->Same as (0-1) Knapsack , the difference is only that the supply of items in unbounded kanpasack is unlimited.