The Change Making Problem - Fewest Coins To Make Change Dynamic Programming

Поделиться
HTML-код
  • Опубликовано: 12 янв 2019
  • Code & Problem Statement @ backtobackswe.com/platform/co...
    Free 5-Day Mini-Course: backtobackswe.com
    Try Our Full Platform: backtobackswe.com/pricing
    📹 Intuitive Video Explanations
    🏃 Run Code As You Learn
    💾 Save Progress
    ❓New Unseen Questions
    🔎 Get All Solutions
    Question: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1.
    Examples:
    1
    Input:: coins = [1, 2, 5], amount = 11
    Output 3
    2
    Input: coins = [2], amount = 3
    Output: -1
    Approach 1 (Brute Force)
    We can generate all sets of coin frequencies that end up summing to the total amount given the coins that we granted and then take the sequence with the least coins in it.
    This is not only harder to implement, but it entails an automatic exponential amount of work to compute all the sets of coin frequencies to only take the best answer (the set with the least coins) from.
    Approach 2 (Top Down Dynamic Programming)
    Example:
    Input:: coins = [1, 2, 5], amount = 11
    Output 3
    The answer to the subproblem for amount 11 is the same thing as the MINIMUM of the answers to the sub problems with each currency deduced from the original sub problem (11) PLUS ONE since we are acting as if each coin we subtract from 11 is the last coin used to make change.
    Not all paths will yield an answer, some will yield an optimal answer.
    Complexities (Top Down)
    A is the amount to make change for.
    n is the total denominations avaliable to make change with.
    Time: O( A * n )
    For each amount we will approximately be doing n work in trying to deduct each denomination from the current sub problem
    Our recursive tree will at maximum have a depth of S (worst case if each call deducts 1 at each call).
    Space: O( A )
    We answer and store a total of A subproblems in our dynamic programming table to get to our globally optimum answer.
    Approach 3 (Bottom Up Dynamic Programming)
    Example:
    Input:: coins = [1, 2, 5], amount = 11
    Output 3
    We can also create a dynamic programming table going from the bottom up to the amount we want an answer for.
    Complexities (Bottom Up)
    A is the amount to make change for.
    n is the total denominations avaliable to make change with.
    Time: O( A * n )
    For each amount we will potentially try each of the denominations (there are n of them).
    Space: O( A )
    We answer and store a total of A subproblems in our dynamic programming table to get to our globally optimum answer.
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    HackerRank: / @hackerrankofficial
    Tuschar Roy: / tusharroy2525
    GeeksForGeeks: / @geeksforgeeksvideos
    Jarvis Johnson: / vsympathyv
    Success In Tech: / @successintech
  • НаукаНаука

Комментарии • 937

  • @BackToBackSWE
    @BackToBackSWE  5 лет назад +92

    Table of Contents:
    Me Talking (Uninteresting) 0:00 - 0:19
    The Problem Introduction 0:19 - 1:48
    Top Down Recursion Walkthrough 1:48 - 7:43
    Bottom Up Iterative Walkthrough 7:43 - 20:18
    Time Complexity 20:18 - 21:42
    Space Complexity 21:42 - 22:19
    Wrap Up 22:19 - 22:52
    The code for this problem is in the description.

    • @nguyentranconghuy6965
      @nguyentranconghuy6965 5 лет назад +3

      tushar roy part?

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад +1

      @@nguyentranconghuy6965 yeah

    • @AfroMuggleKing
      @AfroMuggleKing 4 года назад +1

      Bro I don't think your approach works for input coin = [2] and amount 3 in your bottom up approach. 2 is less than 3 so dp[3-2]=dp[1] which is 0 plus 1 is 1. which is false.

    • @anandartwork
      @anandartwork 4 года назад +2

      Won't greedy itself give a solution for this problem? Why use DP here?

    • @4sky
      @4sky 4 года назад

      @@anandartwork I was thinking about this as well

  • @snowing906
    @snowing906 5 лет назад +385

    The Tushar Roy clips in between 😂😂

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад +28

      yeah, I'm geekin'

    • @amirtv106
      @amirtv106 4 года назад +15

      @@BackToBackSWE I can't watch Tushar anymore.... You are actually enjoyable to watch

  • @mauricegoldberg7458
    @mauricegoldberg7458 4 года назад +199

    this guy is literally the best at explaining algorithms on all of youtube lmao. no other vids compare haha

    • @BackToBackSWE
      @BackToBackSWE  4 года назад +10

      great to hear.

    • @bryanlozano8905
      @bryanlozano8905 3 года назад +2

      truth

    • @qwarlockz8017
      @qwarlockz8017 2 года назад

      @@bryanlozano8905 I definitely love watching them. The enthusiasm is catching!

    • @CostaKazistov
      @CostaKazistov 2 года назад +4

      NeetCode, Abdul Bari and Tech Dose are outstanding at explaining algorithms as well

  • @leonardomaffeidasilva9774
    @leonardomaffeidasilva9774 4 года назад +144

    Wow: U did the calculations till the end, instead of saying "and so on". +1
    Good explanation. ;)

    • @BackToBackSWE
      @BackToBackSWE  4 года назад +1

      thx

    • @RicardoBuquet
      @RicardoBuquet 4 года назад +14

      If he wouldn't have done that, I think I wouldn't have understood it :D

    • @BackToBackSWE
      @BackToBackSWE  4 года назад +2

      @@RicardoBuquet nice

    • @ameyparanjape3292
      @ameyparanjape3292 3 года назад +2

      That does make it clearer, Kudos!

    • @woodslee6202
      @woodslee6202 3 года назад +2

      +1. this is remind me of studying mathematical proof, it skip some steps by saying like "it's obvious", but I did not get it.

  • @gurtagel
    @gurtagel 5 лет назад +152

    Dude this is legit the best video i have found by far on DP. Please keep making these on hard-to-grasp CS concepts (maybe do rabin-karp/other string matching algos next lol). The other youtubers dont explain at the level you do, they make too many assumptions about what is obvious, or their accent makes the video hard-to-comprehend

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад +53

      YES. YES. YES. YOU SEE THE VISION NOW?? haha.
      Yeah this is exactly how I felt when my head was in the dirt learning dp.
      I was always pissed off.
      Like...I need not say more. What you said is why I grind out these videos.
      That is the vision. A channel of hundreds of videos with CRYSTAL clear explanations.
      A lofty goal, but better to shoot for the moon and to land amongst the....you know the quote :)
      Edit: Future Ben is reading this comment haha (version 9/2/2019 me), I made this comment when I was crazy and no one watched the channel. Precontext.

    • @cherriercheung
      @cherriercheung 4 года назад +2

      Back To Back SWE love your videos! Keep up with your good work!

    • @BackToBackSWE
      @BackToBackSWE  4 года назад +7

      Just reread this comment and I sound crazy lol

    • @wizziesfan
      @wizziesfan 4 года назад +1

      @@BackToBackSWE but we love you

    • @BackToBackSWE
      @BackToBackSWE  4 года назад +2

      @@wizziesfan wassup

  • @ABU_BEKIR_SIDDIK
    @ABU_BEKIR_SIDDIK 4 года назад +58

    12:24 "1+1 =2" I felt that.

  • @jim7195
    @jim7195 5 лет назад +75

    perfect explanation dude, the Tushar part was gold lmao

  • @rakeshnarvaneni9300
    @rakeshnarvaneni9300 4 года назад +17

    Dude, this is the best explanation for Dynamic Programming on RUclips.
    Please keep going!

  • @stressfreetrading1341
    @stressfreetrading1341 4 года назад +27

    "We have tried all our coins and the winner is 5"
    "I have tried all other videos and the winner is U"...
    best explanation bro.. thanks alottttt....

  • @betim2007
    @betim2007 4 года назад +5

    I have watched a lot of videos on youtube trying to find a good explanation for this, but none comes close to this video. For someone just learning to program, I will say this guy is an excellent teacher.

  • @oolong4700
    @oolong4700 4 года назад +13

    This is the most clear explanation that i have ever heard!
    thanks a lot.

  • @Abhay.Bhandari
    @Abhay.Bhandari 3 года назад +5

    I have no words to thank you. You are really awesome!! This question I am trying to understand from 3 days. But you had cleared in just 20 mins.
    Teaching is an art and you are a great artist.

  • @CSam-hc4uk
    @CSam-hc4uk 5 лет назад +10

    Thanks for being so patient explaining how the values are put in every cell!

  • @Izma9
    @Izma9 5 лет назад +5

    God bless you mate. I was trying to understand the solution from the leetcode explanation for hours and from the guy in your video at the beginning as well. You have a talent to teach complex things in understandable way. Keep up the good work

  • @pritabratamallik5391
    @pritabratamallik5391 3 года назад +2

    I really appreciate his style of explanation. He repeats himself, a lot. Probably it is because of this we are able to grasp the concepts. He is really filling the gaps left out by other creators.

  • @elvinjafarli6257
    @elvinjafarli6257 2 года назад +2

    Hey there man, I want to thank you for the effort and time you spent making this pure information brilliance available for free. Best of luck and wishes in your future endeavors. You are helping us out a lot :)

  • @curt1893
    @curt1893 3 года назад +3

    Man, I love your energy and you are making this make so much sense! I hope you are doing well.

  • @thekewlwaffle
    @thekewlwaffle 5 лет назад +3

    And it finally clicked in my brain, THANK YOU! Subscribed!

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад +3

      THAT IS AWESOME. This is why I do this. I hope you have more moments like that.

  • @vincenzoincutti
    @vincenzoincutti 4 года назад +1

    Really well explained ! Thank you so much I've been trying to wrap my mind around my lecturer's explanation but your way of explaining is way clearer!

  • @oqant0424
    @oqant0424 2 года назад

    Dude this is legit the best video i have found by far on DP.

  • @diamondmohanty2915
    @diamondmohanty2915 4 года назад +3

    Best explanation ever. I have watched many but this is great.

  • @tanmayagarwal8513
    @tanmayagarwal8513 4 года назад +6

    Amazing effort!! I wasted my whole day in understanding this. Wish I could see that at first!! Amazing explanation.

  • @nnamdiibeanusi5309
    @nnamdiibeanusi5309 4 года назад +1

    This is THE BEST explanation for dynamic programming I have ever seen. I appreciate how you focused on the intuition behind the technique and solved the problem to its completion rather than just saying "And so on..."

  • @tashp
    @tashp 4 года назад +2

    This video is the best tutorial I've seen online, thank you so much for your clear explanation, you're an amazing teacher!

  • @cluster027
    @cluster027 5 лет назад +3

    Thank you for tracing the entire solution when you were doing the bottom up approach. It made it much more understandable.

  • @manojamrutharaj9071
    @manojamrutharaj9071 4 года назад +4

    Very well explained. Great energy and amazing presentation skills. Keep up the good work Benyam. You might have lost first 3 interviews, but, your videos might have helped others crack their interviews in some way. Be proud of it. Thanks for your effort in making these videos.

  • @siddhantsharma6747
    @siddhantsharma6747 4 года назад +1

    This is totally the best Dynamic Programming video I've ever seen. Dude, you rock!

  • @GabrielToriz
    @GabrielToriz 3 года назад

    This is the most clear explanation for this problem! Now it's clear for me why all those operations and how they work together.

  • @abebe7017
    @abebe7017 4 года назад +3

    God bless this dude! OMG!!!! I feel I am gonna kill my interview with Microsoft!

  • @arsyaswanth5
    @arsyaswanth5 5 лет назад +66

    Tushar Roy wants to know your location!!!🤣🤣

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад +6

      hahahahahahahahahahah, best comment ever!

    • @Goateduzi
      @Goateduzi 3 года назад +1

      Lmao I’m geeked

    • @ameynaik2743
      @ameynaik2743 3 года назад

      Whats the story behind this? Just curious!

    • @Abhay.Bhandari
      @Abhay.Bhandari 3 года назад

      @@BackToBackSWE only an Indian can give such comments. 😆

  • @8767346704
    @8767346704 4 года назад +1

    The way you explained was amazing, period. I tried to watch to other videos for the explanation, but the idea clicked easily with your approach! also kudos to the entire walk through till the last iteration!
    Thanks! keep posting such awesome stuff!

  • @tenshii_92
    @tenshii_92 2 года назад

    Hands down best video on the subject. Thank you

  • @BackTrack35
    @BackTrack35 5 лет назад +16

    Dude I love u xD , My exam is in 2 days and i have been trying to solve this question for hours and I almost got depressed cuz i couldn't solve it. u made it clear and simple and easy to understand , couldn't ask for a better explanation. Honestly I wish my college had lecturers like u, I swear im not kidding . thank u so much for this video , Subbed :D

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад +1

      It is nothing. Thanks for watching.

    • @BadBoy-hm3vk
      @BadBoy-hm3vk 5 лет назад +2

      Hey!!
      which course are u studing now?

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад

      @@BadBoy-hm3vk hey

    • @BadBoy-hm3vk
      @BadBoy-hm3vk 5 лет назад +1

      @@BackToBackSWE hey!! can you pls tell me that what i want to do after my bca.i m just confused about what to do either go for a 2 year work experience or 2 year masters and i also have a dream to be good in algorithms and machine learning.does doing mca is enough or i need to do go for higher studies?.

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад

      @@BadBoy-hm3vk Honestly not sure. I'm a 2nd year in college as of the writing of this comment. Ask r/cscareerquestions. They have good advice.

  • @nelsonthekinger
    @nelsonthekinger 4 года назад +5

    I'm clapping with all my might!
    Great Job!
    Side note: I was caught on that Face swap.. funny as hell! ahahaha XD

    • @BackToBackSWE
      @BackToBackSWE  4 года назад

      haha and thanks and sorry - old video, had few watchers

  • @VioletteToussaint
    @VioletteToussaint 2 года назад

    Thank you so much, you're the best, you made it so easy to understand while many others use unnecessarily confusing denominations. Now everything makes sense!

  • @kiratis
    @kiratis 4 года назад +1

    I have searched a lot of tutorials about the change making problem and I can say that your VDO explanation is the best.

  • @sanjaymadhavan1893
    @sanjaymadhavan1893 4 года назад +4

    You are so underrated:")

  • @aliaksandrhn1
    @aliaksandrhn1 3 года назад +3

    Someone please buy this gentleman a beer because God knows he deserves it. Thank you!

    • @BackToBackSWE
      @BackToBackSWE  3 года назад

      I am only 20...oh wait no im 21 now lol

  • @michaelmay962
    @michaelmay962 3 года назад

    This is the best video on this problem. Thank you so much!

  • @danishfayaz8077
    @danishfayaz8077 2 года назад +1

    Easily the best DP explanation on youtube. Bless you brother

  • @sky76570
    @sky76570 5 лет назад +18

    Follow-up: Return the actual coins.

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад +6

      Hahaha. No no no.
      Follow-up: Solve Leetcode 999..."The Protein Folding Problem"

  • @jesy1732
    @jesy1732 4 года назад +3

    Im lost with +1
    *(
    Edited: I got it!!
    WOW this channel is amazing : )

    • @BackToBackSWE
      @BackToBackSWE  4 года назад +1

      Comeback of the century

    • @jesy1732
      @jesy1732 4 года назад +1

      Juan2003gtr
      Imagine the +1 as an action
      The Coins[1,2,5]
      Say you need to give someone change for 2 cents. You have 1 coins, 2 coins and 5 coins ( you trying to find the least amounts of ways to give change)
      Only way you can give change for 2 cents is 1 coins and 2 coins.
      (Remember an action is like +1 )
      1 coin + 1 coin = 2 cents
      1 coin (action) + 1 coin(action) = 2 cents
      Add the actions: 1 action + 1 action = 2 actions. It took 2 actions to get 2 cents for using 1 coins.
      2 coin = 2 cents
      2 coin(action) = 2 cents
      Add the actions: +1 action = 1 action ( same as 0+1 = 1) It took only 1 action to get 2 cents, the 2 coin.
      We know now that the 2 coin took less actions to get 2 cents. But how does the program language know that in code form?
      Subtract each coin from the number 2, what ever number it is, it should already know the least amount to give change for that number you subtract to.
      The 1 coin:
      2 - 1 coin = 1 (the number )
      To get change for number 1 the least, is the 1 coin. So the number 1 already has an action the 1 coin(+1).
      Add another 1 coin to get the number 2, which is other action (+1)
      (+1) + (+1) = 2 actions (Same as 1 coin + 1 coin = 2 cents)
      So The 1 coin took 2 (actions) to get 2 cents
      The 2 coin:
      2 - 2 coin = 0 (the number)
      To get 0 it takes no action to get zero, so it’s zero. Add the 2 coin, which is 1 action (+1)
      0 + 1 = 1 action ( same as 2 coin = 2 cents)
      So the 2 coin is 1 (action) to get 2 cents
      Now compare the actions for 1 coin and 2 coin.
      Which is less 1 or 2?
      1 (the 2 coin)
      Hope that helps😀

  • @chanchang7640
    @chanchang7640 3 года назад

    Love your video! The though process is nicely described.

  • @edonis2787
    @edonis2787 Год назад

    This was hands down the best explanation I’ve seen on this problem

  • @abdoulbarry6929
    @abdoulbarry6929 3 года назад +3

    How can you be this good at explaining to students when you are a student yourself? I need to know your path Sir! Can't be the regular 20 year old college student

  • @puperhacker2150
    @puperhacker2150 5 лет назад +4

    lmao at the Tushar clips!

  • @chandrashekhar9470
    @chandrashekhar9470 4 года назад +2

    You make code visualizes into our head like a movie.Its like we are watching some coding based movie which is so exciting and interesting that we just go into recursion and get the best.Thanks a lot for such a deep explanation.Keep posting more videos these are quite useful.

  • @fardeenrahman3845
    @fardeenrahman3845 5 лет назад +1

    Thank you from the bottom of my heart, Your talking style and teaching are really awesome and energetic.

  • @suraj8087
    @suraj8087 5 лет назад +5

    what c++ is to c , is what this channel is to Tushar Roy :). P.S : Tushar Roy is a great channel

  • @tejassameera8962
    @tejassameera8962 4 года назад +7

    why does he talk like he's teaching 5 year olds lmao good content tho

    • @BackToBackSWE
      @BackToBackSWE  4 года назад +3

      I'm in a library so had to talk quietly. This was early when I didn't have a microphone and like 2 people watched lol

    • @tejassameera8962
      @tejassameera8962 4 года назад

      Back To Back SWE 😂😂 all love dude. Ur content is actually fire

  • @lavishgarg4274
    @lavishgarg4274 4 года назад +2

    you are great bro, the thing which I am not getting from past 5 days has been deliberately and easily explained by you in just 23 minutes,god is seeing all your good work, be happy and be successful in your career.

  • @paulocoelho55
    @paulocoelho55 4 года назад +1

    This channel is a life savior!
    Many thanks and keep up with the good work :D

  • @heyitsnikhil7956
    @heyitsnikhil7956 4 года назад +4

    the 16 dislikes are from tuschar roy. 😂😂

    • @BackToBackSWE
      @BackToBackSWE  4 года назад

      haha chill

    • @lavishgarg4274
      @lavishgarg4274 4 года назад +1

      @@BackToBackSWE now Tushar has urged his subscribers to do 5 dislikes more

  • @Hav0c1000
    @Hav0c1000 4 года назад +3

    When I did this problem, I imagined it as a bfs graph problem, where I have to traverse from the requested amount to 0. Each node has a neighbor that is itself - ci. as long as that value is >= 0. You can then solve this with simple BFS. Once you find 0, you have the shortest path. I see in LC, this is faster than DP. I don't understand why no one considers this method. The visited set prevents you from doing redundant work. I think BFS is the way to go... forget DP people!

    • @BackToBackSWE
      @BackToBackSWE  4 года назад

      thanks for sharing - im replying to comments super fast so can't proof-read the approach presented

    • @mehdisaffar
      @mehdisaffar 4 года назад

      I think the problem is that the memory grows too fast at every level

  • @urussahelaheebocus8158
    @urussahelaheebocus8158 Год назад +1

    Keep up the good work.. No words to this awesome work!! We need more teachers like u 🙏

  • @pascuallopez8910
    @pascuallopez8910 3 года назад

    In my algorithms class , and this saved my life. Thank you for this . DP isn't as scary as it was made to seem !

  • @CraigMine
    @CraigMine 4 года назад +3

    Wait are you really expected to solve something like this in a interview without having heard of the solution before? i can't imagine a lot of people would come with an algorithm like that in their mind

    • @BackToBackSWE
      @BackToBackSWE  4 года назад +1

      It is a famous problem

    • @CraigMine
      @CraigMine 4 года назад

      @@BackToBackSWE i was new to dynamic programming and slowly I understand thsoe problems 😍

  • @ericdai5221
    @ericdai5221 2 года назад

    Man, your explanation is so good! Thanks for making this video!

  • @allanmagalhaes8211
    @allanmagalhaes8211 2 года назад

    Fantastic, dude. You made me understand the code even without writing a single line. Thank you.

  • @julieirwin3288
    @julieirwin3288 3 года назад

    Best explanation of this problem, thank you!

  • @terrencechungong1954
    @terrencechungong1954 6 месяцев назад

    This is the clearest explanation of the concept by far. Great work!

  • @zhiqianzhang5772
    @zhiqianzhang5772 Год назад

    OMG this is the best video I've ever watched for dp!! So clear and detailed!! Thank you bro!!

  • @chetansahu1505
    @chetansahu1505 4 года назад +2

    You have the talent to mentor complex things so easefully that nobody does it better.

  • @warnercooler4488
    @warnercooler4488 3 года назад

    Awesome explanation! Thank you so much!

  • @allen724
    @allen724 3 года назад

    Thank you for the video man!!! This is the best channel for learning algo concepts and basics!

  • @fatihdurukan4602
    @fatihdurukan4602 5 лет назад +1

    I was having a hard time to understand! Now I get it. Great explanation!

  • @dash8x
    @dash8x 4 года назад +1

    Thank you for this explanation. I needed this for part of an actual production system.

  • @doruwyl
    @doruwyl 5 лет назад +1

    Great explanation!
    Making this in-depth videos will help people understand easier the concepts in no time.

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад

      Thanks! This is one of the problem I cover on the site I'm making: twitter.com/thebigoguide

  • @chaitrajambigi3426
    @chaitrajambigi3426 5 лет назад +2

    Thanks a lot for this lucid explanation, i was struggling to understand this since along time and now its much more clear

  • @zivashnivash2512
    @zivashnivash2512 2 года назад

    Thank you sir! Your explanations are incredible!

  • @hipsterhp
    @hipsterhp 2 года назад

    this was amazingly helpful, thank you!

  • @eustin
    @eustin 2 года назад

    you're amazing! best explanation I've found.

  • @GoodMasterManu
    @GoodMasterManu 3 года назад

    Thx for the help! Big hug from Portugal!

  • @rohithbontala2916
    @rohithbontala2916 5 лет назад +2

    Writing code becomes easier when I can understand the approach...really appreciate your explanation...Thanks a ton!!!

  • @faris.abuali
    @faris.abuali 2 года назад

    Thank you so much!
    Great explanation!!
    Concise and informative ❤❤

  • @wendywang8535
    @wendywang8535 3 года назад

    Bro you explain very well! Thanks a lot!

  • @jaewoongshin5209
    @jaewoongshin5209 5 лет назад +1

    Bro, this is the best explanation I have even seen..thank you for walking through all steps in the bottom-top algorithm..now I do understand how this works..

  • @MrJAEChannel
    @MrJAEChannel 4 года назад +1

    This is great, best on RUclips for Dynamic programming. thanks!

  • @aswink1505
    @aswink1505 4 года назад +2

    best explanation I found for this problem. Great job!

  • @FoodieNishi
    @FoodieNishi 5 лет назад +1

    Thank you so much! You've helped me understand so many of these problems

  • @AbanoubAsaad-YT
    @AbanoubAsaad-YT 3 года назад

    You're the best one explaining DP clearly :)

  • @heathivie986
    @heathivie986 3 года назад

    After watching video after video, I was able to solve this problem without looking at the code based only on your description. Well done, thank you

  • @ronakgupta7492
    @ronakgupta7492 4 года назад +1

    Best explanation so far! Never understood this problem this clear.

  • @manjunathbhat8431
    @manjunathbhat8431 4 года назад +1

    Hats off to you for explaining in a very simplistic manner.

  • @warisulimam3440
    @warisulimam3440 2 месяца назад

    Wonderful video and very verbose explanations. I can't believe you actually worked through each of the cases for the bottom-up approach. Most people would've done the first few and said "and so on" and filled up the remainder of the table. Thank you for the video.

  • @rinado4374
    @rinado4374 3 года назад +1

    The visual helps so much in understanding the problem. Thank you so much!!

  • @glennpavel4800
    @glennpavel4800 3 года назад

    finally a good explanation , great job

  • @rahul10anand1
    @rahul10anand1 4 года назад +1

    Blows my mind every time I watch your videos.

  • @623-x7b
    @623-x7b 2 года назад

    Subscribed. This is better than any teaching I've had from any of the video lectures at university. Love your exhaustive approach. The repetition really helps get the idea through!

    • @BackToBackSWE
      @BackToBackSWE  2 года назад

      Thank you, glad you liked it 😀
      Do check out backtobackswe.com/platform/content
      and please recommend us to your family and friends 😀

  • @uneq9589
    @uneq9589 3 года назад

    As you said in the video, understanding the tree did help. Helped me understand what I was doing wrong and got me straight to the accepted solution.

  • @simonanikolova1719
    @simonanikolova1719 2 года назад

    you helped me understand dynamic programming. thank you

  • @VermaAman
    @VermaAman 5 лет назад +1

    My whole concept of DP just became clear. Thanks a lot :)

  • @Goateduzi
    @Goateduzi 3 года назад

    Good job, man. I had a friend struggling with this and I couldn’t explain worth shit. I looked for vids and yours was the best I found.

  • @imSovi
    @imSovi Год назад

    my god. thank you for actually going through the whole thing. i didn't actually grasp the bottom up approach until you hit 3 or 4. most teachers would've stopped at 2 and said "you get the pattern".
    great teacher.

  • @tonynguyen6124
    @tonynguyen6124 Год назад

    I was confused at first when looking at the array but going through the problem helped a lot. Thanks for the great explanation.

  • @Megabushbuck
    @Megabushbuck 3 года назад +1

    I was struggling with this until you showed me "The CHANGE Making Problem". U are a life changer. Thanks

  • @acspd7
    @acspd7 4 года назад +1

    One of the best explanations on the topic of dp. Bravo!

  • @SanTosh-zg2iv
    @SanTosh-zg2iv 4 года назад +1

    Thank you my dear friend for such a lucid, clear and crisp explanation of DP , The way you taught to identify the hidden sub-problem which is the crux of DP , I appreciate your hard work. My sincere thanks to you!!!

  • @kafuikwame8483
    @kafuikwame8483 5 лет назад +1

    Great Explanation! This is the best channel!!

    • @BackToBackSWE
      @BackToBackSWE  5 лет назад

      Thank you. We have a long way to go. I want everyone to get offers.

  • @ricardoorellana1168
    @ricardoorellana1168 5 лет назад +1

    Thanks for this awesome explanation, the bottom up step by step explanation worth gold!