Skip to content
My solutions to the Google Foobar Challenge (September 2016 edition)
Branch: master
Clone or download
Conchylicultor Minor formating
Add little precision

Typo

Typos

Typos

Precisions

Typo

Typo
Latest commit a2ce417 Nov 25, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
imgs Submit solutions Nov 25, 2016
LICENSE Initial commit Nov 25, 2016
README.md Minor formating Nov 26, 2016
distract_the_guards.py Submit solutions Nov 25, 2016
dodge_the_lasers.py Submit solutions Nov 25, 2016
doomsday_fuel.py Submit solutions Nov 25, 2016
find_the_access_codes.py Submit solutions Nov 25, 2016
lvl2_1.py Submit solutions Nov 25, 2016
lvl2_2.py Submit solutions Nov 25, 2016
running_with_bunnies.py Submit solutions Nov 25, 2016
the_grandest_staircase_of_them_all.py Submit solutions Nov 25, 2016

README.md

Google Foobar

I've got the chance to receive an invitation for Google Foobar few month ago. I'll probably never been contacted anymore so I share the code I submitted back then. After completing the challenges, here are some thought about it.

Interface

The challenges have an increasing difficulty, but the last level is definitely one step above all others, maybe because it is more about math than algorithm. They let you 22 days to solve this challenge. Each solution can be done using either Java or Python. In my opinion, people who choose Python have a big advantage over those who keep Java. In addition to the fact that prototyping is much faster with Python due to the less verbose (and more permissive) syntax, Java would require to re-program features otherwise available in the Python standard library (the fact that the itertools or fractions modules were allowed was quite convenient).

Usually, the solution can be found by starting from a brute-force algorithm and optimizing on top of that (sometimes require refactoring). The brute-force implementation help to better understand the problem and generate some data to find a pattern. For some problems, doing some data visualization really helped to discover patterns and made the challenge much easier.

FractalSpiral

While I was completing level 5, I triggered Foobar again. It doesn't change anything but gives you the possibility to launch two challenges at the same time. If you want to try, here are the keywords which can trigger the challenge. Being located in the US and more specifically in the bay area probably helps:

  • python list comprehension
  • dependency injection

Those are the two which worked for me. There are other queries which works too (From what I've heard, queries related to hashmap, pthread or try catch). When typing the query, be careful and wait a few second (something like 2s) to gives enough time for the message to appear. I think I missed another opportunity one year ago when I closed the page while the message was appearing.

After completing the last level, you get some message encrypted in base64, maybe with PGP. I'm not sure if everyone get the same message though.

End

You can’t perform that action at this time.