I just finished PS2a(after a long long time), but just want to make sure it looks right. And if anyone has any input. http://dpaste.com/604150/ Thanks
I'm still working on PS1, but I'll look at your code after I've moved on to PS2.
looks good to me ... it produces the correct answer
Thank you, I worked on that for a while.
Hi CastorTroy, how did you derive your algorithm? It seems better than mine.
Hi, sorry for the late reply...I haven't looked at this in a while. I worked for a long time trying so many different ways of solving this problem. First I made a list that puts all the combinations that can be bought into one list. Then, If the number isn't in that list it goes into a second list, which is then a list of all the combinations that can't be bought. it seemed simple after I did it, but I had a bit of trouble with this one.
Join our real-time social learning platform and learn together with your friends!