Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 29 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
ARTSMART: Art!
2 hours ago 4 Replies 3 Medals
Jasonisyours: What were the key causes of the French Revolution in 1789?
3 hours ago 2 Replies 4 Medals
PureSoulless: Why is the word "Pedophile" always censored in yt vids?
1 day ago 3 Replies 0 Medals
Jalli: What's 58x3634u00b07
20 hours ago 6 Replies 3 Medals
arriya: who wanna play roblox
1 day ago 5 Replies 1 Medal
brianagatica14: Any artist on here?
3 days ago 7 Replies 2 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!