Рет қаралды 102,850
This video explains a very important and famous dynamic programming interview problem which is the coin change problem.It is a variation of Unbounded knapsack problem.In this problem, we are given an array of coin denominations and an amount to be formed.We are required to pickup coins of any denominations any number of times and form the given amount.We need to form the amount using minimum number of coins and return this minimum coins as our answer.If it is not possible to form the amount then simply return -1.I have explained the problem statement using simple examples and I have also shown the idea an intuition to visualize a solution for the problem.I have first explained the recursive solution idea and then I have explained the tabulation dp approach.At the end of the video, I have also shown the code using dynamic programming in both CPP and JAVA. CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
========================================================================
Join this channel to get access to perks:
/ @techdose4u
INSTAGRAM : / surya.pratap.k
SUPPORT OUR WORK: / techdose
LinkedIn: / surya-pratap-kahar-47b...
WEBSITE: techdose.co.in/
TELEGRAM Channel LINK: t.me/codewithT...
TELEGRAM Group LINK: t.me/joinchat/...
=======================================================================
CODE LINK: gist.github.co...
USEFUL LINKS:
Coin Change 2: • Coin Change 2 | Dynami...
01 Knapsack Tabulation DP: • 01 Knapsack Tabulation...
#coinchange #dp #knapsack