CORRECTION: @16:20 in coin 5 and weight 6 intersection it should be 2, at coin 5 and weight 11 intersection it should be 4, at coin 10 and weight 6 intersection it should be 2, in coin 10 and weight 11 intersection it should be 4. I hope you guys got this correction. :)
Thx for this video, but u have mistake in first for loop. U cannot have j + 1: twoDimensional[i][j] = twoDimensional[i-1][j] continue if j + 1 - coins[i] == 0: twoDimensional[i][j] = 1 + twoDimensional[i-1][j] continue if j + 1 - coins[i] > 0: twoDimensional[i][j] = twoDimensional[i-1][j] + twoDimensional[i][j-coins[i]] print(twoDimensional) coins = [2,3,5,10] doMatrix(mince2,15)
I have never seen a more clear explanation for this popular problem. I'd wish to have all my instructors like you back in time. Now I stand and clap this great instructor. Thanks!!!
please make a complete series on dynamic programming.I have scourged the internet,and you are by far the best.Please help students in understanding such concepts.Thank you so much.
Hats off to you mam, literally you are far far better teaching from our college professor to whom we are paying lakhs of rupees. Bow down for your deliberate teaching and the way you are teaching. If this kinda teaching we gonna get we will definitely fall in love with DSA/DAA.
I think DSA (specifically DP) is the only part in coding where most of IT professionals lack skills to code because most of the teachers aren't able to explain clearly, but through your videos, you can help every young IT professional to understand these concepts better
You are the best! You explained this so clearly! It was so helpful that you explained what the rows, columns, and what each cell represented as well as the strategy for calculating the values. I was so confused when my professor lectured about it, but in so little time, I learned a lot from you! THANKS SO MUCH!!
Super mam..I I'll become a best professor award in my college ..really you I'll helping me a lot.. very much big fan of your work..thank you once again mam..
Thank you so much mam ,i watched this video in almost four channels but i wasnt able to get a proper idea about how to proceed but your explanation made it very easy for me to understand
Wow, wish you would have made them almost one year ago..I would have scored 100/100 in DSA..still thanks ..pls keep making such useful videos..Great method of explaining...❤️ ❤️ ❤️ ❤️
Thank you very much. Your lectures are best and really save my algorithms course at university. Without your lectures, I will probably fail my course. Can you pls make vedios on backtracking algorithms and related problems like N-queens and Sudoku in the future? Thank you for your great lectures:)
Ma'am thank you so much your lecture really helped me understand the algorithm behind this problem. Though I was able to implement the algorithm I still have one doubt as to what was the logic behind including the coin step? Though I was able to implement it but couldn't understand it very well. Thanks.
Your explanation is great mam, but you could also try asking the viewers thought provoking questions like why this particular approach of Include/Exclude approach and explain how to think like this at first which may help them not only to understand the problem but also able to give similar solutions in future with better understanding (Only thing that's seems to be missing in your wonderful videos :) !)\
Theres no meaning to mug up some random method, just because it gives the answer, an explanation behind the method should be given, and not doing some bodmas operation without any logic.
The table format of 2, 3 ,5 10 is wrong in middle, please solve it on your own but her method is correct.it takes our 30 minutes to identify this error. Thanks
at 16:18 for coin 5 and weight 6 there are 2+0 possible ways to get 6. it's written 3? even logically 2+2+2 and 3+3 are the two possible ways no third way to get 6 using coins of 2,3 and 5.
using 1D array def coinchange(s,m,n): arr = [0 for x in range(n+1)] arr[0] = 1 for i in range(m): for j in range(s[i],n+1): arr[j] += arr[j-s[i]] return arr[n] def main(): s =list(map(int,input('Enter the coin array:').strip().split())) m = len(s) n = int(input('Enter the main amount:')) result = coinchange(s, m, n) print(result) if __name__=='__main__': main()
10:00 "the shortcut if coin value > sum then just copy the above value this is the simple trick, this is the simple rule".. this is where I get lost.. the rest of the video seems to heavily rely on this "trick" but I just cant deduce where this comes from. I see some other comments in the video from people that also seem to not be able to follow from this part. Some replies mentioned another video of yours and even other people but I still dont get where the formula comes from
Correct !!!...Even i also got stuck in same place. @Jenny :- You should 1st explain the logic behind this problem..That how to deduce the formula instead of just writting the code using formulas.
CORRECTION: @16:20 in coin 5 and weight 6 intersection it should be 2, at coin 5 and weight 11 intersection it should be 4, at coin 10 and weight 6 intersection it should be 2, in coin 10 and weight 11 intersection it should be 4.
I hope you guys got this correction. :)
Yes mam
Code you have written will give a segmentation fault as you are referring to the index of a[i-1] and i is 0; Thanks.
Can u post the code if possible as iam unable to write the code for the first row
Thx for this video, but u have mistake in first for loop. U cannot have j + 1:
twoDimensional[i][j] = twoDimensional[i-1][j]
continue
if j + 1 - coins[i] == 0:
twoDimensional[i][j] = 1 + twoDimensional[i-1][j]
continue
if j + 1 - coins[i] > 0:
twoDimensional[i][j] = twoDimensional[i-1][j] + twoDimensional[i][j-coins[i]]
print(twoDimensional)
coins = [2,3,5,10]
doMatrix(mince2,15)
@@xavierxavier97 hi mince 2 means???
I have never seen a more clear explanation for this popular problem. I'd wish to have all my instructors like you back in time. Now I stand and clap this great instructor. Thanks!!!
wohh galat heii BC
12:52 when you are saying fine. This is the best style i have ever seen. just enjoying your way of teaching.
Thank you so much Jenny, much love and respect for you and all Indians from Egypt
please make a complete series on dynamic programming.I have scourged the internet,and you are by far the best.Please help students in understanding such concepts.Thank you so much.
Few are covered and working on ..... Pls check my videos and playlist for more
th-cam.com/play/PL_z_8CaSLPWekqhdCPmFohncHwz8TY2Go.html
Hats off to you mam, literally you are far far better teaching from our college professor to whom we are paying lakhs of rupees.
Bow down for your deliberate teaching and the way you are teaching.
If this kinda teaching we gonna get we will definitely fall in love with DSA/DAA.
I think DSA (specifically DP) is the only part in coding where most of IT professionals lack skills to code because most of the teachers aren't able to explain clearly, but through your videos, you can help every young IT professional to understand these concepts better
i wish hamare yaha itni achi teacher hoti you are great
You are the best! You explained this so clearly! It was so helpful that you explained what the rows, columns, and what each cell represented as well as the strategy for calculating the values. I was so confused when my professor lectured about it, but in so little time, I learned a lot from you! THANKS SO MUCH!!
Super mam..I I'll become a best professor award in my college ..really you I'll helping me a lot.. very much big fan of your work..thank you once again mam..
Thank you mam and for those who are saying they didn't get this explanation try to concentrate on board more...everything here is crystal clear ❤️❤️
Thank you for explaining the great tricking dynamic programming to all. Your explanation made it easy . Kudos great work 🎉
I want to thank you for explaining why Amount 0 is always 1. I have watch other videos and they never explain it the way you do. Thank you very much.
why is it 1?
Thank you so much mam ,i watched this video in almost four channels but i wasnt able to get a proper idea about how to proceed but your explanation made it very easy for me to understand
Happy to help
You and your way of teaching are just Awesome...
Great Explanation....
Thanks for it.....👍👍👍👍👍
Explained with enormous patience!
Wow, wish you would have made them almost one year ago..I would have scored 100/100 in DSA..still thanks ..pls keep making such useful videos..Great method of explaining...❤️ ❤️ ❤️ ❤️
Beauty with Brain. deadly combination....Thank you so much mam, You just save me from my biggest obstacles.....
Thank you so much madam...
I missed my ADA lecture
Then i found your Videos
Very Useful For Me.
Thank you very much. Your lectures are best and really save my algorithms course at university. Without your lectures, I will probably fail my course. Can you pls make vedios on backtracking algorithms and related problems like N-queens and Sudoku in the future?
Thank you for your great lectures:)
Thanks mam Finally i understand the coin change problem.🧑💻🧑💻
finally i found a grt vedio with some good explanation .
Thank you! Helped me solve Project Euler Nos 76 & 77 in less than 1/10 ms run time!!!👏
Ma'am thank you so much your lecture really helped me understand the algorithm behind this problem. Though I was able to implement the algorithm I still have one doubt as to what was the logic behind including the coin step? Though I was able to implement it but couldn't understand it very well. Thanks.
very clear, no hesitation, really understandable. love this lecture... thank you for creating a great videos. 🧡🧡
Your code will give a segmentation fault when i==0 as it is accessing i-1
Explanation is really nice. Thanks.
Correct code :
for(int i=0;i
In else block for i==0 table[i][j]=table[I][j-coin[I] I think
Beauty and Brains, very rare, beautiful explanaition. Had you been my BTech professor, my attendance would be 100%,
love you ! never meet a teacher such clearly and good!
Thanks for such a clear explanation and detail walk through of the problem.
thank you so much
Your explanation is great mam, but you could also try asking the viewers thought provoking questions like why this particular approach of Include/Exclude approach and explain how to think like this at first which may help them not only to understand the problem but also able to give similar solutions in future with better understanding (Only thing that's seems to be missing in your wonderful videos :) !)\
I genuinely loved the approach of tushar roy in the same problem.
Theres no meaning to mug up some random method, just because it gives the answer, an explanation behind the method should be given, and not doing some bodmas operation without any logic.
The way you algos ma'am is really amazing
I already know this, still watched full video. Just because the way you teach it. Thank you. Please keep on uploading make studying interesting.
you are amazing, it's enjoyable how you teach these concepts in a so simple way!
Really formula looks to scary but you explained it in observation method....salute.. regards from ld college of engineering...😌
this is super helpful, especially the exclusion and inclusion part, keep up the good work!
thank you so much!!!
Greetings from Greece.
You're the best Jenny, THANK YOU!
So happy mam thank You soooooo much 🙌🏻🙏🏻 God Bless You ☺️
I write very few comments on youtube. But really your work is commendable. Jai ho Jenny didi ki 😁😁
Beautifully explained. Appreciate your Work Ma'am.
Mam your way of teaching dp is great..Plz make more videos..
Thanks Jenny! This is the best video i've seen on this topic!
You're a very good lecturer
Bravo and thanks! I'm off home now to code this in c++. THANK YOU!!
Best tutorial channel ever
you really save my semester 😍😍😍😍
This woman is extremely clever that is all I can say.
Solved......from you.....this.....is...lit🔥🔥🔥thanks for helping us
Thank you Jenny! lots of love
Thank you Mam , Please keep it up . You are really great 🙏
I would add a bit of tech background on the 3 items (exclude|include|add). Thanks anyways for the explanation
The table format of 2, 3 ,5 10 is wrong in middle, please solve it on your own but her method is correct.it takes our 30 minutes to identify this error. Thanks
Ma'am, thankyou for clearing concepts💛
your explanation is just awesome , cleared my all doubts related to this topic.
and one more thing you have a beautiful dipper eyes
You doing great job please make a video on how should crack the interview of product based company
wonderful explanation.Pls do include such videos
Wow, you are an amazing teacher. Thank you!
I see many videos but in this video I learn making change at the first time thanks lot
Thanks a lot madam.Your explanation is very good and helpful for us
Please make more videos on algorithms especially dynamic programming
Good explanation thanks a lot
Thank you mam❤️ for such kind of explanation ,but my question is how did u get the logic behind this problem
TYSM mam it was very helpful of you to explain so deep. Please keep explaining such algorithmic questions.
also in the first for loop their should be ( i < len(coins) )
You are god , very detailed explanation. Could not understand the implementation part when my professor at university teaches.Thank you very much
Thank you for this step by step guide. I was struggling to understand how to formulate the table but I think I grasped it now.
Very easy explanation.
at 16:18 for coin 5 and weight 6 there are 2+0 possible ways to get 6. it's written 3? even logically 2+2+2 and 3+3 are the two possible ways no third way to get 6 using coins of 2,3 and 5.
Yes it would be 2...by mistake I wrote 3.. Just follow the formula and u will get 2..btw thanks for this correction
@@JennyslecturesCSIT yes I was solving along so stumbled on that difference. Thanks for the videos. Helped a lot!
Thanks a lot Apu............ It's great for understanding
Thank you ... Your explanation helped me alot for understanding of logic clearly..
mam you are the best !!!! very very gud method of teaching keep uploading more and more vedeos
Good Explanation...main logic is clear but how to the make first row in program? that 1,0,1,0,1,0 kind of.
Thank you for the simple explanation really appreciate that
Very nicely explained -- thank you.
Mam you are a game changer :)
Thank you ma'am. Wonderfully explained!
ATM is the good example which uses this algorithm
Expecting more videos related to dynamic programming or coding related problems.
best all covering tutorial
Great explanation mam, you did clear everything..
you should also explain how did you get this approach,rather than just showing the pattern in the table!!
For an explanation of why refer to her video where she talks about the 'why?' th-cam.com/video/J2eoCvk59Rc/w-d-xo.html
Extraordinary explanation mam. Thanks
How to compute values for a[0][j] when i=0 iteration programatically?
Great explanation ma'am. A suggestion, your video can be better if you start with providing the intuition to the solution :)
Perfect Explanation of Backtracking. Thank you
Very good explanation
Great explanation! Thanks a lot Jenny.
"simple rule" :D You need to explain why, with examples. Had to watch another video to understand what you were saying.
using 1D array
def coinchange(s,m,n):
arr = [0 for x in range(n+1)]
arr[0] = 1
for i in range(m):
for j in range(s[i],n+1):
arr[j] += arr[j-s[i]]
return arr[n]
def main():
s =list(map(int,input('Enter the coin array:').strip().split()))
m = len(s)
n = int(input('Enter the main amount:'))
result = coinchange(s, m, n)
print(result)
if __name__=='__main__':
main()
Nice and in depth explanation maam and if possible then please make a video on 'Top down and Bottom up approach' 👍👍
She already has one. Here you go:
th-cam.com/video/lVR2u9lsxl8/w-d-xo.html
@@Finn-jp6pn Thanks 🙂
if u want to understand dp check aditya verma's dp series
thats the best series u will ever watch on dp
thank you ,
you way teaching is awesome .i like it
Thanks you so much ma'am, solid explanation,plz add more video in this playlist ma'am.
Thank you so much! You really helps me in preparing for my test! 👍🏻
Superb explanation , Thanks a lot .
10:00 "the shortcut if coin value > sum then just copy the above value this is the simple trick, this is the simple rule".. this is where I get lost.. the rest of the video seems to heavily rely on this "trick" but I just cant deduce where this comes from. I see some other comments in the video from people that also seem to not be able to follow from this part. Some replies mentioned another video of yours and even other people but I still dont get where the formula comes from
Correct !!!...Even i also got stuck in same place. @Jenny :- You should 1st explain the logic behind this problem..That how to deduce the formula instead of just writting the code using formulas.
Ma'am! You're great
Very good explaination.. Thanks
Ma'am you are super awesome.. Thank you for the content..❤️🙏
Really nice explanation
I think there is a mistake in row 3 column 6. It should have been 2 not 3.... We take the value above 2+tablet[2, (6-5)]
Please make on some advance DP problem also you are awesome...loved the way you explain
Thank you for the explanation!!