Author | Message |
---|---|
kaancalstatela
Posts: 52
|
Posted 19:15 Jun 01, 2016 |
I'm trying to find a good solution for the coin change problem using greedy algorithm. I found some youtube videos to practice from because the book doesn't really offer a good explanation for using greedy algorithm for a coin change problem. This one in particular has been a lot of help. Now from my understanding, there are certain scenarios where a greedy choice doesn't result in an optimal solution. I believe this specific question is one of them. You can always attack the largest coin and use pennies for the rest but an optimal solution would be using only two coins. Not really sure if that's the right way to do it so I would appreciate some feedback on this. If you're also confused about the whole thing, I sincerely recommend checking out the youtube video. Puts things in a nicer perspective. I hope you're having fun with the homework. Good luck with the quiz on Friday. Last edited by kaancalstatela at
19:16 Jun 01, 2016.
|