Live data from Hacker News

Can you solve it? The Greplin programming challenge

challenge.greplin.com

51–60 of 167 posts

Re: Can you solve it? The Greplin programming challenge

#51

Do I get bonus marks for solving this without writing any code?

I immediately went to Wikipedia, found out what type of CS problem the first challenge was, then followed the external links at the bottom of the page to find the Perl module I needed and installed it from CPAN. I quit because this seemed like cheating but now I'm thinking... Maybe it was the point? To see if I would try to find something off-the-shelf to solve the problem quickly. Still not sure it was, because if s…

I didn't solve the problems using existing code either. All three are entirely solvable by pencil and paper (or just inspection in the first case).

Re: Can you solve it? The Greplin programming challenge

#52
post #27

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 cor…

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.

Re: Can you solve it? The Greplin programming challenge

#53

Earlier quoted context omitted.

I immediately went to Wikipedia, found out what type of CS problem the first challenge was, then followed the external links at the bottom of the page to find the Perl module I needed and installed it from CPAN. I quit because this seemed like cheating but now I'm thinking... Maybe it was the point? To see if I would try to find something off-the-shelf to solve the problem quickly. Still not sure it was, because if s…

I didn't solve the problems using existing code either. All three are entirely solvable by pencil and paper (or just inspection in the first case).

Ah. Well I'm an even worse hacker than I thought!

Re: Can you solve it? The Greplin programming challenge

#54
post #43
post #26

Earlier quoted context omitted.

I don't think trivializing the combinations with Python's builtins, looking up the fib primes with OEIS, or computing factors with Alpha is cheating. I hope, in fact, it's the whole point of the exercise: choose the right tools for the job. If you're writing code to test primeness or generate Fibonacci numbers, I sure as hell don't want to hire you.

If you're writing code to test primeness or generate Fibonacci numbers, I sure as hell don't want to hire you. Maybe you should have called it the "Greplin Challenge," then, instead of the "Greplin Programming Challenge." It's not a real task, after all; the reward comes from accepting a completely artificial challenge. I'm going to do the challenge before dinner tonight, and before I leave work I could get source co…

Maybe we have a different hiring mindset than dschoon - we're equally happy with people who find the answers or create the answers. In a production system, we certainly wouldn't want hand-rolled primeness checking. But in a programming challenge, we think it's fun to write it for yourself.

Re: Can you solve it? The Greplin programming challenge

#55
post #47

That was fun, good waste of time while my code was compiling. I just used C++ and hacked up a prime seive for #2 and for #3 used a combination generator I had previously used before - http://photon.poly.edu/~hbr/boost/combinations.html

for #3 used a combination generator

Congratulations, you just used an exponential-time algorithm for a polynomial-time problem.

Re: Can you solve it? The Greplin programming challenge

#56
post #23

So what languages did everyone use? I decided to try a different one on each level, so I used Python, bash (letting GNU coreutils 'factor' do the hard work), and Haskell, respectively.

JavaScript. I had my browser open ... it seemed like the logical place. :)

Re: Can you solve it? The Greplin programming challenge

#57

Anybody else browsing by mobile try to do Level 1 by inspection?

I was in the middle of thinking through the algorithm when I looked at it and saw the password in the text --- the password worked but I still want to code the algorithm later to confirm.

That's sort of what I mean here. It's like solving a wordsearch puzzle. There can't be more than a couple dozen strings with structure xyx, or xyyx. Find them by eye and work outward and see if it's zxyxz, and so on. Decided to make this process into my algorithm.

Re: Can you solve it? The Greplin programming challenge

#58
What about a puzzle system system -- Companies can post/host questions and then review the answers. I've drafted a quick blog post if anybody wants to comment more directly... Maybe I'll make it this weekends projects (since my frid.ge clone was killed by Facebooks new groups).

http://bit.ly/b6GC6F

Post reply on HN