News for hackers. Stuff that matters.
Re:Can you solve it? The Greplin programming challenge by nene on Friday October 08, 2010 @04:14PM (#1773174)
I'm usually pretty bad at these kind of challenges (lately I tried registering at one mind-challenges site, but I couldn't even get past the five entry-level questions, which would have allowed me to even register), but this was surprisingly easy. Simple brute-force methods worked for each of the three tasks. I was totally surprised that the first time I entered the answer for each of the tasks, it was indeed the correct one.

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 :=)

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.