Hacker News new | past | comments | ask | show | jobs | submit login
The Hyperpublic Programming Challenge (hyperpublic.com)
68 points by way66 on Feb 24, 2011 | hide | past | favorite | 41 comments



We thought this would be fun to make and fun to work on for an hour or two. Let us know if you have any feedback or questions.


Nice succinct contest, I like it.

Problems are good, graded difficulty (don't want to discourage anyone with the first problem), solutions don't take terribly many lines of code. Low barrier to entry makes for a fun contest. Problem 2 is on par with a medium-hard ACM ICPC question, probably one of the harder questions I've seen in a startup-made contest. High five.


The second one isn't that hard once you recognise the kind of problem it is; then it's just a case of writing out a standard solution (I don't want to be more explicit in case I spoil it for someone else).

I have done a few of these puzzles; the ones I remember were for Quora and STA. Of those, this had least code and was quickest to write - it was fun to think about, but I didn't really learn much doing it.

In comparison, the Quora question involved various optimisations in C code (for speed) which was a bit of a time-waster - I think this tests a wider range of knowledge much more quickly. But my favourite was an STA question on inferring relatives from DNA which meant learning something new (high dimensional data; particularly locality sensitive hashing).

Personally I would prefer to see all the questions at the start, so I can see how interesting everything is, and how much time is involved. I don't really understand the advantage (to the people asking) of having them chained.

PS I find the spammy comments on this thread very odd. Are Hyperpublic themselves using sock puppets? That really makes you look bad.


Thanks for the feedback, and I agree that if we ever create more problems it'd be a good idea to help people learn along the way.

Re the spammy comments, our entire team are longtime HN users so we all know those hurt way more than they help, but think one of our "fans" wanted to "help" a little too much. Love their enthusiasm though.


Did you mean a US ACM-ICPC Regional ? Because I have never seen basic DP problems in a north-eastern European regional or an ACM-ICPC final.


yes. these problems wouldn't make sense in the finals


who else has done awesome challenges? Greplin had a cool one...seatgeek...who else?


Programming Competition Sites: TopCoder, CodeChef, Project Euler

For Jobs: Quora (http://www.quora.com/challenges), Facebook (http://www.facebook.com/careers/puzzles.php)


Another fun one is: http://www.coderloop.com/


ITA has some clever challenges (including an archive of past puzzles):

http://www.itasoftware.com/careers/work-at-ita/hiring-puzzle...

But then that's the thing, a lot of places have these kind of programming challenge puzzles.

What's the closest to a Putnam for programming challenges?

I know Facebook is trying to position their Hacker Cup this way, but it had a rough start that makes you wonder if it's the best thing for Facebook to run on its own.

It seems like there's an opportunity for a prominent and widely-sponsored event run by a third party.

I presume the sponsors would love a window of exclusivity to see the best results from recruitable competitors.

Even without the obvious recruiting benefits, it would at least capture the imaginations of aspiring programmers worldwide.


I've also spent some time on http://hacker.org

Rather than focus on a specific "answer," you instead write algorithms to solve various flash games based on NP-complete/hard problems. Its interesting since there's always ways to improve. You can start out with a brute-force solver, but as the levels scale your program won't.

They also recently added a "challenges" section, which is more about specific coding tasks. Those are also pretty fun & scale well.

And yes, despite the domain name & poor design, it's actually a pretty serious site. The same guy also did http://goproblems.com/ , which is cool if you're into Go (the board game, not the lang).


I'd love to see something like the ICFP contest (in its better years), made shorter somehow. The 2006 one was especially awesome.



So who won? Where is the announcement?


Did a writeup including winners at blog.dougpetkanics.com


Great; thanks.


OK, just found the email from you (from yesterday) in my spam folder which may explain why I was asking. Sorry about that!


I've published my python solutions for reference, kibitzing, critique, etc. on github: https://github.com/sblom/hyperpublic-challenge

Anyone else published solutions? I'd love to see one in Clojure.


I wonder how many people solve it and then do not send in their key. I know I'm not. I cannot be the only one that was more interested in doing the challenge than the rewards.


At the risk of looking like a complete idiot, I think your solution to problem #2 is incorrect.

Update: I was wrong. It's kind of scary how sure I was of my incorrect solution.


If you find that a useful learning experience, you may want to try http://projecteuler.net/

I've thought "How can my solution possible be wrong" numerous times while doing those problems. Makes you realize how often mistakes slip through in real code, 'that can't possibly be wrong'. Even when you have tests, because for complex behavior, your test case solution may easily be wrong (or worse: derived from your algorithm... I'm guilty of that mistake)


do you say this because your greedy algorithm solution of 450225 didnt work?


Thanks for the ``greedy algorithm'' hint ;-)


I got their answer. Note that there is a wrong "solution" to this problem that looks like it might be right.

It is a very standard problem, by the way. Most books on algorithms will have the solution.


> Most books on algorithms will have the solution.

What would you call this algorithm?

I solved the second problem, but my solution is brute-force, and I'd like to see a better way to do it.


Answer in rot13:

Gur grpuavdhr vf pnyyrq "qlanzvp cebtenzzvat". Naq, guvf cnegvphyne ceboyrz vf pnyyrq gur "pbva punatr ceboyrz".


lbh pna whfg guvax bs vg nf onpxgenpxvat naq zrzbvmr lbhe shapgvba yngre qnfu guvf fubhyq or rdhvinyrag gb gur qc bcra cnera ohg v unirag pbzcyrgryl jbexrq bhg gur qc fb znlor abg dhrfgvba znex pybfr cnera


Great, thanks!


I'm not convinced that brute force is such a bad approach, as long as a) you start with the greedy approximation, and b) stop once you know you're doing worse than the greedy approximation. My python brute-force solution runs in .035 s.


My brute force algorithm runs in about two minutes... It's C++. I'm sure you can see why I'm so interested in better solutions. :-)


I think it's right because I got through using Mathematica's MIP solver http://bit.ly/fr7YXu


Nice to see others using Mathematica. Here are my solutions: http://bit.ly/gghd5K


oooo I want a free Dropbox pro account!!!


This is great. We're working on a startup that could use an open location database such as Hyperpublic. Keep it up!


... a little too obvious?

Funny how all those accounts saying nice things about hyperpublic have been created within the last hour.


the dude who wrote that started jaiku...fyi


early API key available here... http://hyperpublic.com/developers


Hey Hyperpublic, rad contest idea!


Hey Hyperpublic, kudos for keeping things interesting


This challenge sounds fantastic! Great job -- I really want the prizes, too.


Awesome prizes - would love to win the the one month desks at Hyperpublic HQ in NYC or (and?) one year free Dropbox account.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: