Live data from Hacker News

Can you solve it? The Greplin programming challenge

challenge.greplin.com

81–90 of 167 posts

Re: Can you solve it? The Greplin programming challenge

#82
post #3

Uh ... call a phone number? No thanks. Edit: Excellent! Back to hacking.

I'm curious to know why calling a phone number was a deal-breaker. It seemed eminently likely (to me) that it would be an automated system, but, even if it wasn't, talking to someone isn't that big a deal to me. I certainly wasn't concerned about long-distance charges, but I suppose that might be a problem for some. I thought it was a nice little twist in the problem set.

I live in Norway, so the phone bill is a significant factor. Also, the wife and kids are sleeping in the next room, which would require me to step outside on the porch in the middle of the night with my cellphone.

Yet also, I'm so tired I couldn't have englished very well in my phone anyway. :-)

Re: Can you solve it? The Greplin programming challenge

#83
post #3

Uh ... call a phone number? No thanks. Edit: Excellent! Back to hacking.

I'm curious to know why calling a phone number was a deal-breaker. It seemed eminently likely (to me) that it would be an automated system, but, even if it wasn't, talking to someone isn't that big a deal to me. I certainly wasn't concerned about long-distance charges, but I suppose that might be a problem for some. I thought it was a nice little twist in the problem set.

Maybe you don't want them knowing your phone number to call you back with job calls or whatever. (Of course, there are ways around that too.)

Re: Can you solve it? The Greplin programming challenge

#88
post #26
post #25

"Even if you're not looking for a job, we'd love to hear what you thought about the challenge." I would be curious how many people did you lose because of phonecall requirement (before you changed it). Also CSV for just a list of 22 numbers wasn't really necessary. If you do web puzzle, the best is to keep everything self-contained, no downloads, no using external channels, just copy and paste. FYI another Python che…

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.

I tend to agree with dkarl here because if it was for real, I would just have looked here to find all the answers and maybe the passwords.

It was way more fun to do it from scratch :D

Thanks grepplin

p.s. the csv was copied in my [] python list :)

Re: Can you solve it? The Greplin programming challenge

#89
post #80

Earlier quoted context omitted.

for #3 used a combination generator Congratulations, you just used an exponential-time algorithm for a polynomial-time problem.

Congratulations are in order, he sacrificed 400ms CPU time to save at least a few minutes of coding time.

I wasn't being entirely sarcastic. It never occurred to me that you could use a non-polynomial-time algorithm.

Re: Can you solve it? The Greplin programming challenge

#90
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.

I used Haskell for the first one (was my first actual Haskell program, everything before was just xmonad config), C for the second one (already had the needed code for generating fibonacci sequences and a prime number sieve from when I went through the euler problems using only ANSI C) and Perl for the last one. I initially used Data::PowerSet for the Perl code, but decided to write my own after it took several minutes to build the combinations and I discovered that I had the wrong answer because I improperly read the problem.

I should note that I used the existing C code I had because I had no idea where they would intersect and didn't feel like writing Yet Another Arbitrarily Large Integer Handler.

Post reply on HN