Re:Can you solve it? The Greplin programming challenge
by Tichy on Friday October 08, 2010 @08:27PM
(#1773972)
brute force seems to be sufficient
Re:Can you solve it? The Greplin programming challenge
by leif on Friday October 08, 2010 @11:45PM
(#1774293)
you also probably don't want to memoize, you aren't going to re-use, so why waste the memory?
Re:Can you solve it? The Greplin programming challenge
by Natsu on Saturday October 09, 2010 @01:31AM
(#1774425)
I wrote that right before leaving for work, so I hadn't spent any time thinking about the problem.
Coming back, I see that I really don't need to be very efficient for any of these problems, which I honestly find a little disappointing.
I'd write a bit of code to memoize the function before I'd do the Fibonacci numbers, though, and I just don't have time to continue right now, even though it's pretty easy. Are the rest of the tests like that? Do they force you to use more efficient code, rather than simpler brute force tests so that your code has a decent runtime?