The Coin Change Problem

Поділитися
Вставка
  • Опубліковано 4 січ 2025

КОМЕНТАРІ • 23

  • @Aziqfajar
    @Aziqfajar 5 років тому +3

    Best video yet through the searches. Keep up the great work, man.

    • @NERDfirst
      @NERDfirst  5 років тому +1

      Thank you very much! Glad you liked the video =)

  • @dimitrismezes9970
    @dimitrismezes9970 5 років тому +2

    Best explanation with great visualizations!

    • @NERDfirst
      @NERDfirst  5 років тому

      Hello and thank you very much for your comment! Very happy to be of help =)

  • @celiafuentes7291
    @celiafuentes7291 4 роки тому

    Awesome explanation of possible approaches and reasons for each!

    • @NERDfirst
      @NERDfirst  4 роки тому

      Hello and thank you very much for your comment! Glad you liked the video =)

  • @antoniodominikovic7496
    @antoniodominikovic7496 5 років тому +1

    Great video! Simple explanation that actually makes sense..or cents in this case =) !

    • @NERDfirst
      @NERDfirst  5 років тому

      Oh, that's a good one =) Thank you very much for your comment! Glad you liked the video =)

  • @smritikasadhukhan3086
    @smritikasadhukhan3086 5 років тому +1

    Best video, man you really explained it to me! Thankyou very much,

    • @NERDfirst
      @NERDfirst  5 років тому

      You're welcome! Very happy to be of help =)

  • @om08uhkn
    @om08uhkn 6 років тому +1

    Thanks man, your video really helped me. You're doing a great job.

    • @NERDfirst
      @NERDfirst  6 років тому +1

      Hello and thank you very much for your comment! Very happy to be of help :)

  • @hegon_str5518
    @hegon_str5518 2 роки тому

    thanks for the explanation

    • @NERDfirst
      @NERDfirst  2 роки тому

      You're welcome! Glad to be of help =)

  • @kjdz0910
    @kjdz0910 6 років тому

    Hello, my thesis is about this topic, but I need to solve it using integer linear programing. The case is a supermarket. I would like to ask you, how would you use ILP to solve the coin change problem? If you could give me a suggestion, you will help me a lot.

    • @NERDfirst
      @NERDfirst  6 років тому

      Hello and thank you for your comment! I'm sorry but I don't have any knowledge of ILP at all. That style of programming is very far beyond my skillset I'm afraid!

  • @abdallahmohamedehab987
    @abdallahmohamedehab987 4 роки тому

    Can u please tell me the solution by using brute force?

    • @NERDfirst
      @NERDfirst  4 роки тому

      Hello and thank you for your comment! The recursive solution, which I start explaining at around 7:11, is a brute force solution.

  • @shahriarmim4696
    @shahriarmim4696 5 років тому

    So we need 3 coins. but which 3 coins we actually need ? (problem from the memo table)

    • @NERDfirst
      @NERDfirst  5 років тому

      Hello and thank you for your comment! Here we hit into a limitation of the algorithm shown. It only tells you how many but there's no real way to find out what coins you've chosen, since when each box is filled, we make a decision about which coin to pick but don't store that anywhere! Additional data structures are needed to store this information.

  • @omarosmanov727
    @omarosmanov727 5 років тому

    How to actually print out all combinations of amount? Let us say for amount=4, coins=[1,2,3] need to print out: (1,1,1,1); (2,2); (1,1,2);(1,3)

    • @NERDfirst
      @NERDfirst  5 років тому

      Hello and thank you for your comment! This can be quite difficult especially if you're using the DP approach. You may have to augment each "cell" of your memo table with the coins that actually make up the value.

  • @VibratorDefibrilator
    @VibratorDefibrilator 4 роки тому

    Qustion: How many ways are to make the sum of 51 with that set - [1, 2, 3, 5]? How about 2020?