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

On ps8, is there a good way to visualize how to obtain the "winning" set of items using the decision tree presented in the lecture? Most everywhere I have looked use the "bottom-up" table : http://www.youtube.com/watch?v=EH6h7WA7sDw Would like to know if folks who have solved it visualized it using the table rather than the decision tree. Thank you.

OpenStudy (anonymous):

i used the decision tree methodology presented in the lecture and adapted the fastMaxVal function that was presented in the lecture. never saw that table method till someone posted it recently - I tried it out and the table method is about ten times faster than my decision-tree solution.

OpenStudy (anonymous):

Thank you. Looking at the binary decision tree I had a hard time figuring out how to keep track of which item (course) had been put in the knapsack. Looking at the table for the keep matrix was a lot easier to figure out how to write the code and eventually I got it. I think I need a lot more practice on Dynamic Programming. :)

OpenStudy (anonymous):

i'm still not sure i could use it effectively.

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!
Latest Questions
toga: is nature or nurture more important
4 minutes ago 0 Replies 0 Medals
toga: can you burn water
14 minutes ago 14 Replies 1 Medal
notmeta: help
1 hour ago 4 Replies 0 Medals
toga: why are you not supposed to pop pimples
1 hour ago 11 Replies 1 Medal
zombieblud: Help
2 hours ago 4 Replies 2 Medals
KarmaXD: How do u tell your crush u like him/her???
1 hour ago 2 Replies 0 Medals
PureSoulless: (Genuine question.) Is being a femboy gay?
10 hours ago 0 Replies 0 Medals
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!