0/1 Knapsack Problem Dynamic Programming

  Рет қаралды 1,966,220

Tushar Roy - Coding Made Simple

Tushar Roy - Coding Made Simple

9 жыл бұрын

Given a bag which can only take certain weight W. Given list of items with their weights and price. How do you fill this bag to maximize value of items in the bag.
/ tusharroy25
github.com/mission-peace/inte...
github.com/mission-peace/inte...

Пікірлер: 1 100
@cityandsuburb
@cityandsuburb 5 жыл бұрын
Thank you Mr. Roy, I cannot express just how important it has been to find your upload... Gus, London.
@RanveerAggarwal
@RanveerAggarwal 8 жыл бұрын
Nicely put! Thanks for the explanation. It's great that you take an example and go through the problem step by step. Keep up the good work! :)
@shashanksagarjha2807
@shashanksagarjha2807 3 жыл бұрын
please watch this playlist for detailed explanation of dynamic programming..kzfaq.info/sun/PLeF0b8iqbx4mTBJZ5ukIYj92_B4k2L1-8..
@shashanksagarjha2807
@shashanksagarjha2807 3 жыл бұрын
please check this playlist : kzfaq.info/sun/PLeF0b8iqbx4mogykbd82-HY9Y1-JS9MDr
@touching-fish-technologist
@touching-fish-technologist 8 жыл бұрын
I finally see it, 2 years after I learnt my algorithm class. Thank you.
@shashanksagarjha2807
@shashanksagarjha2807 3 жыл бұрын
please check this playlist : kzfaq.info/sun/PLeF0b8iqbx4mogykbd82-HY9Y1-JS9MDr
@seanbenhur
@seanbenhur 3 жыл бұрын
@@shashanksagarjha2807 wish that playlist could be in english man
@bugra04
@bugra04 2 ай бұрын
After 8 years, still so much better than our computer science teachers. Thank you for the video. -Turkey
@vijayrawat09
@vijayrawat09 6 жыл бұрын
nice video gautam gambhir
@PritamBanerjee999
@PritamBanerjee999 4 жыл бұрын
:D
@yashchoudhary4685
@yashchoudhary4685 4 жыл бұрын
🤣🤣🤣
@TheAdityaVerma
@TheAdityaVerma 4 жыл бұрын
We all know, this is not practical, I am aditya I am from NIT and I got placed at flipkart you can watch my DP playlist. Just watch from the very starting and I can promise you, you wont be disappointed. kzfaq.info/get/bejne/pNefqrh7362RmYE.html
@nagarjuna119
@nagarjuna119 4 жыл бұрын
@@TheAdityaVerma I agree
@thevijayraj34
@thevijayraj34 4 жыл бұрын
ha hah
@alexanderdishes5384
@alexanderdishes5384 6 жыл бұрын
Tushar, THANK YOU!!!! This was a great explanation. I wish my class material was as clear as this.
@gretacwink8659
@gretacwink8659 Жыл бұрын
This is the THIRD video I've watched on the Knapsack problem and the ONLY one that helped me understand it. Thank you so much for sharing this!
@LeviNotik
@LeviNotik 4 жыл бұрын
Great video. The way you draw out the tabulation and go through it very clearly is very helpful.
@kaushikmondal2966
@kaushikmondal2966 8 жыл бұрын
Very nice, became a fan of you. best online teacher I have ever found. plz keep making video like this, the new generation student will be benefited.. Thank you..
@MegaChi1234
@MegaChi1234 7 жыл бұрын
Best 0/1 Knapsack tut on the Internet! Keep up the good work! :)
@kairatopa9564
@kairatopa9564 4 жыл бұрын
Ever heard of Abdul Bari ?
@adarshverma013
@adarshverma013 4 жыл бұрын
@@kairatopa9564 ever heard of aditya verma
@nagarjuna119
@nagarjuna119 4 жыл бұрын
No way..this is like memoization of algorithms, I definitely recommend Aditya's approach
@Aks-47
@Aks-47 3 жыл бұрын
@@nagarjuna119 absolutely
@blinkxd
@blinkxd 7 жыл бұрын
Amazing tutorial, you explained the process in a very understandable and complete way. Great job man.
@keshavrastogi685
@keshavrastogi685 8 жыл бұрын
You are really doing a great job. Because of you , people are learning tough concepts so easily and getting good jobs . Keep it up tushar :)
@lovisharora6464
@lovisharora6464 3 жыл бұрын
@Tushar Roy, we need more teachers like you. Your virtues: your videos are well paced unlike many other indian videos, which keeps a person interested, no extraneous content -- everything is precise and to the point (extremely helpful) at times while revising concepts. I wish you all the best for your future endeavours. Wish I could meet you some day personally for your autograph. Thanks a lot for your efforts, you are just amazing!! :)
@FinanceStoryTime
@FinanceStoryTime 8 жыл бұрын
Amazing videos man. Like Sal Khan (founder of Khan academy), you have a unique knack for teaching extremely complex concepts. I have learnt so much from your videos. Thank you once again!!
@chowdarynaveen8706
@chowdarynaveen8706 7 жыл бұрын
waste fellow nt explaining correctly nt suit for beginners waste fellow tushora
@TheDeepsz
@TheDeepsz 3 жыл бұрын
I spent 2 whole days trying to understand 0-1 knapsack problem until I stumbled upon this video. This video explains more than just arriving on a mathematical equation. Many thanks for making this video.
@danielko1538
@danielko1538 4 жыл бұрын
this changed my life. Best tutorial out there, i grok after only 5 min where many written tutorials failed
@AmanRaturi1
@AmanRaturi1 7 жыл бұрын
It's far better than 90% videos available on the same topic + you cover the basics... Keep up the good work !🤘
@tusharjajodia9077
@tusharjajodia9077 3 жыл бұрын
You seem to have watched all the videos on platform on this topic.
@tonyji9159
@tonyji9159 7 жыл бұрын
Your videos are so good! I skipped nearly all the lectures for algorithms class this semester cuz I know you'll explain it better than my prof. Thank you Tushar!
@shelbygt5004
@shelbygt5004 8 жыл бұрын
Tushar, your tutorials and explanations are awesome! Keep it coming mate!
@AbhishekNigam
@AbhishekNigam 6 жыл бұрын
Thanks a ton for this video and your complete channel! You are truly gifted, you're a great teacher. Thanks again
@sideways9264
@sideways9264 4 жыл бұрын
one of the best explanations , not just filling the table using the formula ;)
@HarmanJat83
@HarmanJat83 8 жыл бұрын
Thanks a lot for explanation.. I finally understood the algorithm. I have just one suggestion ,you should have 0th column also so that you have its row(top row) with all 0s.I got little bit lost :) with your explanation when you said for the first column with weight 1 that best we can do is 1 (for weight 0 to 7). If you had the top row (with 0s) you could have applied the max formula and shown everyone why each value ended up being 1 (like you did with other three items). The reason I mentioned this is because while writing a computer program we need the top row with 0s in order to make the max formula work for 1st item. But again thanks a lot.. :)
@mimososo123
@mimososo123 6 жыл бұрын
Thanks Tushar Roy for your simple way in teaching and your best way in delivering the main idea of the Algorithm
@swarupmahakud6582
@swarupmahakud6582 7 жыл бұрын
I can't stop seeing your videos!!! You are simply awesome....and it's of course the best video as far as 0-1 knapsack prob is concerned!!!
@subhedarsanchay
@subhedarsanchay 5 жыл бұрын
I like the video. Super helpful. Two things though, I would have loved to see a list of few questions which can be solved using 0/1 Knapsack. Also, in the second part of the video where you explain the formula, it would have been easier to understand if you could have used variable names as row and column instead of i,j.
@TheAdityaVerma
@TheAdityaVerma 4 жыл бұрын
I am aditya I am from NIT and I got placed at flipkart you can watch my DP playlist. Just watch from the very starting and I can promise you, you wont be disappointed. kzfaq.info/get/bejne/pNefqrh7362RmYE.html
@akhilk5121
@akhilk5121 4 жыл бұрын
@@TheAdityaVerma I hope more people see this.
@HiteshKumar-md5yk
@HiteshKumar-md5yk 3 жыл бұрын
@@TheAdityaVerma I have watched your Binary search playlist and they are really good. Great job!
@WinCPP
@WinCPP 8 жыл бұрын
Best tutorial on the 0-1 knapsack problem that I ever saw. Thanks!
@user-se1in4lz6x
@user-se1in4lz6x 7 жыл бұрын
I can't agree with u anymore!!!
@abhisunkara
@abhisunkara 7 жыл бұрын
that basically means you disagree with him.
@garaevgus
@garaevgus 7 жыл бұрын
no that basically means he used to agree with him but now he diasgrees ...time changes
@abhisunkara
@abhisunkara 7 жыл бұрын
I can't agree with you more
@apl1mhd
@apl1mhd 7 жыл бұрын
agree or disagree
@falling_dan
@falling_dan 7 жыл бұрын
You saved my butt big time on understanding this algorithm man! Good work on the tutorial!
@TheSteveSou
@TheSteveSou 8 жыл бұрын
By far the best explanation about knapsack algorithm I 've seen on youtube. Great job!
@sarthakbansal1303
@sarthakbansal1303 5 жыл бұрын
Great! Finally spent an hour on this and All I can say is maybe dynamic programming isn't for me :(
@SumitKumar-ww7he
@SumitKumar-ww7he 5 жыл бұрын
No, brother. Even I had quitted dynamic programming in the middle because I wasn't able to understand anything. but now, I can proudly say that dynamic programming is very intersting topic. So, don't loose your hope, just take some break from dynamic proggramming and resatrt it.
@baburayhanshaik5121
@baburayhanshaik5121 4 жыл бұрын
XD
@shashanksagarjha2807
@shashanksagarjha2807 3 жыл бұрын
please watch this playlist for detailed explanation of dynamic programming..kzfaq.info/sun/PLeF0b8iqbx4mTBJZ5ukIYj92_B4k2L1-8..
@dip00009
@dip00009 9 жыл бұрын
Hi Tushar... Your method is so simple. Easy to understand some complex DP problems. Thanks..
@scayre4078
@scayre4078 6 жыл бұрын
It is the best tutorial of the Knapsack.I'm very thankful for you Tushar
@shifathrahman
@shifathrahman 6 жыл бұрын
It was a nice discussion on 0-1 knapsack. I clearly understood all of it. Thank you for this .
@andreis3416
@andreis3416 4 жыл бұрын
This is the exact same problem I got on my final algorithmics exam. God bless you!
@joeystechpluscode
@joeystechpluscode 4 жыл бұрын
Cool to know it...DP is a lovely programming technique to solve complex problem...here's one more video on the same problem of Knapsack explaining everything in quite detail kzfaq.info/get/bejne/b6ubjZWHnLrNlas.html
@mozey988
@mozey988 4 жыл бұрын
University of Southampton: FBI OPEN UP!
@matulienko1
@matulienko1 9 жыл бұрын
Thanks, helped me prepare for final exams! Greeting from Prague.
@psn999100
@psn999100 8 жыл бұрын
Excellent video Tushar. I never understood this properly in my Masters, but you are way too good. Thanks !
@baggiowong2105
@baggiowong2105 8 жыл бұрын
Really clear explanation and step by step instruction - no obfuscation - thanks for the great video!
@DouglasRocha_
@DouglasRocha_ 8 жыл бұрын
Thanks man! I wished I had a teacher like you when I had my first algorithms class.
@jayeshkawli
@jayeshkawli 7 жыл бұрын
I wish*
@DouglasRocha_
@DouglasRocha_ 7 жыл бұрын
Thanks jayesh
@VivekHajela
@VivekHajela 9 жыл бұрын
Hey Tushar , Many many thanks for doing such a wonderful job of explanining dynamic programming problems in such a lucid way!!. Kudos to you. However in your videos I find one little thing missing and thats is how you arrive at the optimal substructure property of a given example ( which IMO is the crux for nailing down new dyn problems). Like you directly start solving the probem by drawing a 2D /1D array, process of filling the array and then writing down the recurrence at the very end. It would be really helpful if you could spend time in discussing the thorught process to approach the problem first which will really help listeners to develop a knack of solving new dyn problems. As a very specific example , in this video , before even we start to solve the knapsack problem, discussing the optimal substructure property linguistically like : The maximum value that can be obtained from n items is max of following two values. 1) Maximum value obtained by n-1 items and W weight (excluding nth item). 2) Value of nth item plus maximum value obtained by n-1 items and W minus weight of the nth item (including nth item). If weight of nth item is greater than W, then the nth item cannot be included and case 1 is the only possibility. would have been really useful. Thanks again for such a wonderful job!!
@naveenojha5603
@naveenojha5603 6 жыл бұрын
usko bhi nhi samajh aata bhai'
@amirtv106
@amirtv106 6 жыл бұрын
Yes this is what I am looking for
@anupamrajanish3392
@anupamrajanish3392 6 жыл бұрын
You Sir, are great.
@RaviKumar-vk6ib
@RaviKumar-vk6ib 6 жыл бұрын
NAVEEN OJHA he is an employee of apple!!!
@inderjeetchawla527
@inderjeetchawla527 4 жыл бұрын
bro this is not about teaching you about how to think atleast most of the times it is not what he provides in his videos. he rather just teaches interview question that can be asked in straight interviews. if you want to think of how is it done may be someone can teach you that but it would be of no use cause next time you will be stuck again. you need to think yourself it may take a day , two or a week or even longer but until you are the only guy who clears your concept, you wont get what you want. i had this mentor of mine who told me that in a problem he had to use 6d dp can you imagine ? yeah 6d dp he kept thinking about it for about half a month or even more and he finally got his solution accepted it is just about thinking and just thinking bruv.
@meetzaveri4733
@meetzaveri4733 7 жыл бұрын
First i watched MIT's video , didnt understand, and seriously after watching this whole funda has been cleared with ur explanation of formula. Hats off!!!!
@YanuarTriAdityaNugraha
@YanuarTriAdityaNugraha 8 жыл бұрын
Thanks a lot for the helpful tutorial friend! Good work! Will spent this new year holiday watching playlist full of yours!
@AirTimeEh
@AirTimeEh 6 жыл бұрын
For those who are having trouble understanding how the table is generated; for me it helped the most to carefully listen from 8:15 to about 8:45
@memd777
@memd777 8 жыл бұрын
BEST TUTORIAL EVER!!!! !!! I have watched so many tutorials i didn't understand anythything, that T[0][0] thing helped me understood... others just keep saying ith ith idiots. THis is the best, you are the best!!!
@champpiriyapong1496
@champpiriyapong1496 7 жыл бұрын
I totally agree with you.
@quickbitesitsme
@quickbitesitsme 6 жыл бұрын
It would have been still better if he had written MAX ( 1) currentItem's value + T[one_row_up=0][3-3=remaining weight's index] which gives the maximum value for remaining available weight considering all the previous lesser weighted items OR 2) T[one_row_up][same_column] which gives the value considering all the previous lesser weighted items ) . If 2) is chosen, then it means the current item is not chosen for the weight considered at the moment. Of course T[0][0] triggered the thinking process immediately! Just watch 3 or 4 times until you understand and dwell on the logic in your mind to satisfy your intuition completely and for retaining the reasoning why this logic works.
@rubyshell1
@rubyshell1 7 жыл бұрын
Best explanation I've seen for this type of problem, thank you
@rachelwinsor4237
@rachelwinsor4237 8 жыл бұрын
Very helpful! Struggled with knapsack before seeing this, thank you for posting!
@aj9706
@aj9706 4 жыл бұрын
Sir ,I think first recursive approach should be taught then memoize the repeated sub problems.
@chrislovesminnie9659
@chrislovesminnie9659 5 жыл бұрын
Solving my question by 15min comparing my professor by 3 hours...
@digifort1
@digifort1 7 жыл бұрын
Hello Tushar sir, thank you very much for your tutorials. Before I watched them, dynamic programming was looking magical. And now, its lucid and amazing. Please continue your good work. Would like to see more tutorials of yours on Trees section.
@xxbighotshotxx
@xxbighotshotxx 6 жыл бұрын
Thank you for posting this video. After watching the first part before you dove into the code. I was able to form an algo for myself that works! :)
@javadoctor101
@javadoctor101 6 жыл бұрын
For people who are asking about intuition and to explain why does he go up and left. This is what is the crux of DP. It's called memoization. For example, let's see the point where you have 1,3 and 4 weights and w=7 at 8:49. Now you have two choices: 1. Use 4 If you use 4, then you are left with 7-4=3 total knapsack size and 1 and 3 as remaining weights available to you. Now the question can be rephrased as "you have a knapsack of size 3 and 1, 3 wights, available, give me the optimal total value". This is where memoization comes into picture, you have already solved this subproblem and you already have an optimal solution for it i.e optimal value = 4. That is what basically he is doing by going up and left at t[1][3] 2. Do no use 4 Again question becomes, you have a total knapsack of size 7 and two wegiths of size 1 and 3, give optimal value. We have already solved this sub problem as well. It's 5 (t[1][7])
@TheEmad619
@TheEmad619 4 жыл бұрын
the world goes silent when thushar starts thalking.
@abhigyanprakashsagar3227
@abhigyanprakashsagar3227 4 жыл бұрын
🤣🤣🤣🤣
@XERAMMAX
@XERAMMAX 5 жыл бұрын
Very good explanation. In my school i was only confused but with your example its simply and clear. Thanks a lot!!!
@ujjwaltiwari7526
@ujjwaltiwari7526 7 жыл бұрын
thank you very much, i am very happy learning this, i was having a lot of pblm before i watched this video
@SatyanarayanaBolenedi
@SatyanarayanaBolenedi 7 жыл бұрын
hi Tushar, thanks for one more good video!! m = Total_weight, n is size of wt/val array. Time: O(m*n), Space: O(m*n) ( Correct me , If i'm wrong ) If total_wt is say, 1000. then we would need to 1000 columns to solved this problem?? Is there a way to optimise further??
@inshaalam6777
@inshaalam6777 4 жыл бұрын
recursion
@pranavkhandka9318
@pranavkhandka9318 4 жыл бұрын
space complexity can be decreased further bu using sliding .Check on geeksforgeeks
@ashishtrivedi6426
@ashishtrivedi6426 2 жыл бұрын
If anyone hers to learn DP and has fear for DP .. please avoid this sway of learning..... you should learn DP with recursive tree ----> memorization ----> Top down..... please please draw Recursive tree in pen and paper.. else whole life you will fear this sshit........
@giovanniperoni6166
@giovanniperoni6166 10 ай бұрын
Thank you my bro ❤❤❤
@lifutao3446
@lifutao3446 5 жыл бұрын
you're great man, really appreciate all that you do
@Abrar424
@Abrar424 7 жыл бұрын
I was sure that I was going to fail on the quiz on Sunday. You gave me a little hope man. Thanks.
@hargovindsharma9103
@hargovindsharma9103 5 жыл бұрын
Just one problem. The 2D array size should be T[total_item+1][total_weight+1]. First Row and First column should be initialized to ZERO.
@bhavanabharatisingh4135
@bhavanabharatisingh4135 5 жыл бұрын
not compulsory ... u can do as it is explained too ...i did it n it got execute successfully
@sahilgoel6741
@sahilgoel6741 7 жыл бұрын
I dont get the up and going to the left part.
@sigraz
@sigraz 7 жыл бұрын
Let's say you have a basket that can hold 7 kg and you selected an item that is 4 kg weight which gives the value of 6 (best value). After selecting the weight of 4 kg, your basket can still hold 3 more kgs. For that if you go up and 4 steps to left (which means 7-4=3) , you will end up getting the best value that you had found for the remaining 3 kgs (which you had already calculated before coming to the place/row where you selected the 4 kg).
@zems9049
@zems9049 4 жыл бұрын
sir, tmr is my exam and you have no idea how much this video helped me. thank you so much, from the bottom of my heart.
@anmis
@anmis 8 жыл бұрын
Your explanation did provide the nice insight into why we are going back in the previous row while calculating max. Thanks for the explanation and nice video indeed.
@vishalsethi4024
@vishalsethi4024 7 жыл бұрын
Tau ye bhi bata dia kro ki DP ku lagani hai Bs "Yes we will use dynamic programming for this solution" ye to keetab bhi bata deti hai
@akshatjain6854
@akshatjain6854 4 жыл бұрын
Well said
@ambrish8144
@ambrish8144 4 жыл бұрын
true man
@45_ritiksharma32
@45_ritiksharma32 4 жыл бұрын
Bilkul bhai, is table ko bna kr dara or dete hai
@akashpwl
@akashpwl 3 жыл бұрын
kzfaq.info/get/bejne/pNefqrh7362RmYE.html
@winnumber101
@winnumber101 8 жыл бұрын
You're the best thank you
@wikigurus854
@wikigurus854 7 жыл бұрын
You did your best in helping me understanding the solution!. Thanks Tushar!!
@jmpokar
@jmpokar 8 жыл бұрын
I love the way you explain. simple and effective.
@ankushvirmani9039
@ankushvirmani9039 8 жыл бұрын
awesome sir!!
@WingXBlade
@WingXBlade 7 жыл бұрын
My exam is 2 days away and I'm still lurking on youtube for answers.. I'm so screwed
@vaishnavi5070
@vaishnavi5070 6 жыл бұрын
ヘンリーです no you are not alone fam
@salonigarg7738
@salonigarg7738 6 жыл бұрын
My Exam is today, and here I am :P
@ArgaPutraPanatagama
@ArgaPutraPanatagama 6 жыл бұрын
haha me too, my exam is 2 hours left
@jayjeetchakraborty7759
@jayjeetchakraborty7759 5 жыл бұрын
I am giving exam now , i am now in washroom watching this video
@HeadShot4ian
@HeadShot4ian 5 жыл бұрын
how did it go? @@jayjeetchakraborty7759
@emadshoaib7846
@emadshoaib7846 10 ай бұрын
this video finally ended my hunt to find a video which explains me knapsack perfectly
@shubhampande648
@shubhampande648 7 жыл бұрын
Very Nicely Explained! Thank you for this amazing tutorial!
@hippiedonut1
@hippiedonut1 7 жыл бұрын
You completely didn't explain how the re-trace to find out which items are included works. How do you know whether to move up or to the side in the matrix? You only said "it's obviously not coming from x" but didn't explain why.
@novakboskov9090
@novakboskov9090 7 жыл бұрын
Every value is actually maximum of value above it and some other value. When value is same as one above then it's obvious where it came from.
@danhthai7157
@danhthai7157 7 жыл бұрын
I hardly think so, let's say the max method max(4 + 1, 5) obviously returns 5, but how could we know the value 5 comes from the upper position or the value itself.So in that case there are 2 results, ain't there? I don't say he's wrong, I think it's just not completely right.
@novakboskov9090
@novakboskov9090 7 жыл бұрын
You're completely right that he isn't. :)
@redsmile3663
@redsmile3663 7 жыл бұрын
look closely to the if else condition
@esmaelsufe2008
@esmaelsufe2008 6 жыл бұрын
starting from n , tw : just check if ( T[i][j] == T[i-1][j]) // we didn't pick the i-th item and we go to T[ i - 1 ][ j ] else // we picked the i-th item print it and go to T[ i - 1 ][ j - weight[ i ] ] until we reach a zero
@thejtok
@thejtok 7 жыл бұрын
Is this the Indian version of Ray William Johnson?
@thetruereality2
@thetruereality2 6 жыл бұрын
How? man How do you see the resemblance?
@AhmadNadar
@AhmadNadar 6 жыл бұрын
LMFAO!!!!
@DarkLordAli95
@DarkLordAli95 6 жыл бұрын
jokes on you ray william johnson is originally from india.
@Warwipf
@Warwipf 5 жыл бұрын
Fuck, i was about to comment that
@tienle9984
@tienle9984 3 жыл бұрын
You explain it way better than my prof does! Thank you.
@asifbilla4924
@asifbilla4924 7 жыл бұрын
Crystal clear explanation, So easy to understand.I must appreciate your effort.
@anuragphadnis3385
@anuragphadnis3385 8 жыл бұрын
didn't understood anything!!😟
@anuragphadnis3385
@anuragphadnis3385 8 жыл бұрын
+Tushar Roy oh sorry I forgot to mention after I solved coin change problem by watching your video I understood both coin change and knapsack. thank you very much.
@sandeshavhad7737
@sandeshavhad7737 8 жыл бұрын
I need help for printing the selected elements. please suggest me a condition for "while" or "for" loop.
@anuragphadnis3385
@anuragphadnis3385 8 жыл бұрын
+Sandesh Avhad I haven't tested it but I believe you can do this while(i>=0||j>=0) then choose the maximum of the two print it and then alter the values of i and j accordingly
@anuragphadnis3385
@anuragphadnis3385 8 жыл бұрын
To the guys whose comments got deleted due to abuse. Instead of abusing maker of the video try to understand the topic (if you really wish to learn something)
@pratheepc1
@pratheepc1 6 жыл бұрын
Use this which is the simplest. kzfaq.info/get/bejne/qbxxdZOhmp7YnJs.html
@user_8982
@user_8982 7 жыл бұрын
Gautam Gambhir
@LAKSHAYBCE
@LAKSHAYBCE 8 жыл бұрын
Thank you Sir....This really helped me when i m preparing at 11th hour.
@angrydonkeyman5
@angrydonkeyman5 7 жыл бұрын
You're amazing dog, your tutorials are really easy to understand.
@kartikchauhan5498
@kartikchauhan5498 7 жыл бұрын
man, why are you in so much hurry... it all went above my head...didn't get anything..
@kunalhunks
@kunalhunks 7 жыл бұрын
are londa
@samacker77youtube
@samacker77youtube 6 жыл бұрын
Maybe you're incompetent
@utsavprabhakar5072
@utsavprabhakar5072 6 жыл бұрын
try seeing the complete video and watch every iteration. I didnt understand in the starting but then when he came to the third row, that was the time things suddenly started becoming clear.
@moisejean8711
@moisejean8711 5 жыл бұрын
@@samacker77youtube If he knew it he will not be watching tutorial in youtube
@riteish01
@riteish01 5 жыл бұрын
Making the most easier topic the most complicated one Totally not satisfied
@adityakrishna11
@adityakrishna11 5 жыл бұрын
this video wasn't intended for toddlers.
@MaxGuides
@MaxGuides 3 жыл бұрын
Excellent, cleared up my misconception about picking individual higher weight items from a set of items to get closest to target value.
@salmanabedin1313
@salmanabedin1313 6 жыл бұрын
You my good sir, are an excellent instructor! Accept my deepest gratitude for saving my ass as I couldn't make heads or tails of this particular algorithm until i stumbled upon your tutorial.
@keshavlakhotia1432
@keshavlakhotia1432 6 жыл бұрын
Did i m the only one who noticed the mistake at row 3 that should be 01145689
@samedbukru4619
@samedbukru4619 6 жыл бұрын
No. How can u get an total value of 8, when your capacity in that column is only 6. There are only two possible ways: put in weight 4+1 (value 6) or 3+1(value 5). Or look at this approach: If you take weight 4 with value 5, you still have weight left, therefore you go one row up and go 4 columns to the left => 5+1 = value 6
@deepakbisht7764
@deepakbisht7764 7 жыл бұрын
The best part is 9 is the winner😂😂😂 at 11:15
@SabhySingh
@SabhySingh 7 жыл бұрын
Deepak Bisht Bhai issi se pda h knapsack ?
@deepakbisht7764
@deepakbisht7764 7 жыл бұрын
Hunger games who's this
@SabhySingh
@SabhySingh 7 жыл бұрын
Deepak Bisht tere picche jo baith ta h shampy Singh Sabharwal😁
@deepakbisht7764
@deepakbisht7764 7 жыл бұрын
Hunger games 😂😂👌
@anshjhawar9186
@anshjhawar9186 7 жыл бұрын
waah dono topper yahin mil gye :P
@sandeep-lq9iq
@sandeep-lq9iq 8 жыл бұрын
bro i didn't learn like this from anybody else, what a simple way of explaining!!
@TheOscarJB
@TheOscarJB 5 жыл бұрын
thank you for your teaching, this really saves me from the hard-reading lecture note.
@akashpwl
@akashpwl 3 жыл бұрын
kzfaq.info/get/bejne/pNefqrh7362RmYE.html
@swaritthakare3081
@swaritthakare3081 7 жыл бұрын
most confusing explanation
@tanusharma3874
@tanusharma3874 5 жыл бұрын
Right
@gypsykid894
@gypsykid894 5 жыл бұрын
bro explanation was on point and the most practical
@XenogearsPS
@XenogearsPS 7 жыл бұрын
You're a good teacher, but you need to slow down. English is my first language and you're going too fast.
@martinkrauser4029
@martinkrauser4029 7 жыл бұрын
...there's pause? I usually speed up lecture videos.
@XenogearsPS
@XenogearsPS 7 жыл бұрын
Martin Krauser I did use pause. I still like to learn at a pace where I can actually hear what they're saying.
@martinkrauser4029
@martinkrauser4029 7 жыл бұрын
It's all practice. You should check out blind programmers, they listen to their code being read out, and they work at a similar speed to seeing programmers. Insane talking speeds.
@ArchangleTyrel2
@ArchangleTyrel2 6 жыл бұрын
Thank you, finally got a grasp of dynamic programming thanks to you.
@txl8195
@txl8195 7 жыл бұрын
That's pretty clearly with your explanation! Thanks a lot! Pretty helpful for my homework!
@vedantbhagwat8729
@vedantbhagwat8729 8 жыл бұрын
you are teaching like we know everything and we are just rehearsing the topic from your tutorial.. dude its so bad..
@sameergupta2354
@sameergupta2354 7 жыл бұрын
vedant bhagwat he is teaching like a pro. if u don't understand simple algorithm do not jump on to dynamic programming . first get use to simple algorithm then go for dynamic programming.
@istiyakhossain538
@istiyakhossain538 8 жыл бұрын
this is the hardest way i have ever see... make it more easy......
@sandeshavhad7737
@sandeshavhad7737 8 жыл бұрын
Brother this is the simplest way...
@DhimantThanki
@DhimantThanki 8 жыл бұрын
you're ri8 Istiyak
@taoxie1991
@taoxie1991 8 жыл бұрын
This is standard DP solution and really simple and clear, you'd better use this kind of thought when you meet DP problem in the future.
@11m0
@11m0 7 жыл бұрын
it might help to watch it more than once...give it a day or 2 come back and watch it again...hopefully it makes more sense then
@jayeshkawli
@jayeshkawli 7 жыл бұрын
Why don't you accept you're just too dumb to understand this tutorial?
@BorisMediaProds
@BorisMediaProds 9 жыл бұрын
As always, another great video!
@cesarteddybear997
@cesarteddybear997 3 жыл бұрын
Superb! Much better than my Algorithm teacher in Uni, thank you very much!
@VC-kj9yx
@VC-kj9yx 7 жыл бұрын
useless explanation very hard to understand
@ankitshivhare4567
@ankitshivhare4567 5 жыл бұрын
You do a nice job your video is quick short Which is very reliable at exam time to do learn in minimum time Thank you
@abhishek-bl6re
@abhishek-bl6re 4 жыл бұрын
Very nicely explained. Understood the algorithm very well. Thanks Tushar!
@TheOriginalComments
@TheOriginalComments 6 жыл бұрын
The power of explaining the same thing over and over, but in the most fundamental way. Helps me understand a lot, because I can pause the video and try to understand what he is saying. I am also motivated to pause and ponder because I know that was he is saying is correct!
@mohsennz9801
@mohsennz9801 7 жыл бұрын
awesome training! thank you so much! no one could teach it better than this! :)
@kurinchimalarn8555
@kurinchimalarn8555 8 жыл бұрын
That was a very clean and crisp explanation! Thanks Tushar
@inowhy1930
@inowhy1930 8 жыл бұрын
You are wonderful Tushar! Thanks for the videos! They are very easy to understand.
@RagingInverno
@RagingInverno 4 жыл бұрын
I tried two other videos before finding this one. Much clearer explanation than the others I tried. Thank you.
@joeystechpluscode
@joeystechpluscode 4 жыл бұрын
You'll find a more clear and easy to understand explanation on joey'sTech kzfaq.info/get/bejne/pMyFgaWIq9uqn40.html
4.5 0/1 Knapsack - Two Methods - Dynamic Programming
28:24
Abdul Bari
Рет қаралды 2,7 МЛН
Longest Common Subsequence
7:55
Tushar Roy - Coding Made Simple
Рет қаралды 758 М.
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 18 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
0/1 Knapsack problem | Dynamic Programming
13:29
WilliamFiset
Рет қаралды 145 М.
0/1 knapsack problem-Dynamic Programming | Data structures and algorithms
27:31
Jenny's Lectures CS IT
Рет қаралды 1,2 МЛН
MAGNUS VS NEPO || World Rapid Chess
30:52
Chess Twins
Рет қаралды 2,1 М.
AMD Almost Went Bankrupt…but were saved by Sony and Microsoft?
5:35
OpenAI's New SearchGPT Shakes Up the Industry, Google Stock CRASHES!
10:10
The 0/1 Knapsack Problem (Demystifying Dynamic Programming)
20:30
Back To Back SWE
Рет қаралды 203 М.
NEW ROMAN EMPIRE CHESS BOTS!!!!
27:38
GothamChess
Рет қаралды 255 М.
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 18 МЛН