Your other code allowed James T. Kirk to get laid. It us CRUCIALLY IMPORTANT!
As for this one, I had no problem with questions 1 & 2, stumbled into a nice solution for the original McNugget problem that solved it with math rather than exhaustive search, and then faceplanted in problem 4 because I'm pretty sure that assignment 2 isn't supposed to be NP-hard, even at MIT. I... need to step away from it and find some other practice problem with the same logical structure. Sigh.
I got a little intimidated looking at the problem set, because it's been a loooong time since I took math, but it really is mostly "can you loop through stuff until you come up with an answer?"
Yep. I tend to get stuck on "but what's the solution?" rather than "what am I practicing here?"
So with that in mind, I'm off to play with possible combinations of Hardison, Eliot, and Parker; they're better than McNuggets in so many ways. Thanks for posting your solution - it was a good clarifier when I was letting things get too complicated.
no subject
Date: 2009-11-19 02:25 am (UTC)As for this one, I had no problem with questions 1 & 2, stumbled into a nice solution for the original McNugget problem that solved it with math rather than exhaustive search, and then faceplanted in problem 4 because I'm pretty sure that assignment 2 isn't supposed to be NP-hard, even at MIT. I... need to step away from it and find some other practice problem with the same logical structure. Sigh.
no subject
Date: 2009-11-19 02:44 am (UTC)I got a little intimidated looking at the problem set, because it's been a loooong time since I took math, but it really is mostly "can you loop through stuff until you come up with an answer?"
no subject
Date: 2009-11-19 02:55 am (UTC)So with that in mind, I'm off to play with possible combinations of Hardison, Eliot, and Parker; they're better than McNuggets in so many ways. Thanks for posting your solution - it was a good clarifier when I was letting things get too complicated.