Re:Can you solve it? The Greplin programming challenge
by danielsoneg on Friday October 08, 2010 @05:33PM
(#1773487)
Agreed - I was laughing as I was writing some of my code because it was so bad. These sort of questions are designed around algorithm design, but a one-off problem with these small of sample sets doesn't need an elegant solution - a hatchet job does just fine. I'm not a CS grad and my math skills are a bit iffy, but I was able to solve all three challenges in a pretty reasonable amount of time.
But then again... these are all pretty standard computer science problems, nothing that I hadn't in some way done before.
On a side-note: Interestingly I used recursion for each of the three problems. Well... actually for the primes-problem I got stack overflow and rewrote it to not use recursion, but still, at least in principle :=)