I spent a couple hours today working out Google Labs Problem #3 (skip the bottom if you want to solve it for yourself). I don’t need a job or anything, but it caught my interest. Sadly, I’m left with a feeling that there should be a much better way to do it if I were smarter, but hey, I kicked that snack machine’s ass. That’s the important thing.
Yes, this was incredibly nerdy. Yes, I should be doing other things with my time. And no, I haven’t eaten yet today.
[update] I got this response back:
Dear Problem Solver,
Thanks for taking the time to play with our little brain-teaser and for
sending us your solution. While you won’t find a confirmation of the
answer in this email, we did want to let you know that your message was
received and that we’ll be taking a look at it. If you submitted a resume,
we’ll be spending some time with that as well. If it seems like there
might be a fit with a position we have open, we’ll contact you within the
next few days.And as for the answer to the puzzle, we’ll post the ads and the solution
on our site within a couple of months, after those who are a little slower
than you have had a chance to work on it a bit longer. Thanks again for
your interest in Google.The Google Labs Engineering Team
Which puts me in a bit of an ethical dilemma, right? Do I take this link down so the less scrupulous won’t cheat their way to an (admittedly mediocre) solution? Of course, if they do find this, it’ll be pretty much by using Google to search for it (ahh, delicious irony).
See also: Fog Creek Software: Mysterious billboard, Google is behind mystery geek trap
- Algorithm::FastPermute – like Algorithm::Permute, works only on entire list. I just hard-coded my own fixed-depth iterative permutation loops in PHP
- perlfaq4: How do I permute N elements of a list? – this would probably work, didn’t bother
- Hacking The Math: Permutation Generation – like the Perl libraries, does permutations of entire sets, not subsets
- Permutation Generation Methods – reading that would both go over my head and put me to sleep, I’m sure