Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 37 Online
OpenStudy (anonymous):

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

OpenStudy (anonymous):

I'm still working on PS1, but I'll look at your code after I've moved on to PS2.

OpenStudy (anonymous):

looks good to me ... it produces the correct answer

OpenStudy (anonymous):

Thank you, I worked on that for a while.

OpenStudy (anonymous):

Hi CastorTroy, how did you derive your algorithm? It seems better than mine.

OpenStudy (anonymous):

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.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!