Gururaj’s Rumination

Rumination – The word says it all…

Google Treasure Hunt 2008

leave a comment »

Here’s something for you which can persuade you to put on your thinking caps and jump into programming if you’ve been having a dull programming life till now. You may be wondering how did I come to know of this stuff, it’s very simple… I stumbled on this contest while reading Google’s official blog.

Google Australia is running this week-by-week Treasure Hunt – puzzle contest designed to test your problem-solving skills. You will be presented with four brainteasers during this program (every week a new puzzle will be posted) and first entrants to submit the correct answer to each question will entitle himself/herself to receive a prize.

Though it’s already the second week but it’s still worth to give your hand at previous puzzles and to wait for the upcoming ones too… Here’s the link to first week puzzle in case if you wish to start from here.

The first puzzle, called Robot, is something related to Directed graphs and Path finding. In the beginning I found it difficult but later as I tried different approaches I realized what’s the puzzle is asking and how to approach it – that’s when I started drawing directed graph (or state machine) and began to open the mystic box.

The second puzzle, called Zip, happened to be simple and easier. It’s related to directory/file finding and then reading the files to perform summation and multiplication. Looking at the question I first thought I should use “DIR” command on Microsoft Windows to list all the files matching filter criteria but that was not a fertile approach. The next possibility was to use Regular Expressions to filter all files/directories returned again using “DIR” command which match against the criteria but that too didn’t work well due to my inability to write the correct Reg Expression 😦

Finally, I devised a simple approach which solved the problem in one single take. There may also be other simple and direct approaches to solve this problem if you’re fluent with unix/linux shell commands.

At the end of the day what makes me happy is that I’ve solved the first two puzzles and I really feel proud of it.

So are you ready to take this challenge???


Written by Gururaj

May 22, 2008 at 6:16 pm

Posted in Competition, Puzzle

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: