Google Foobar Challenge

Software License

(c) 2017 Sage Callon.

In this repository I'll post my solutions to Google Foobar from level 2 and onwards. I found out after completing level 1 that there's no way to access my code for that submission, so that won't be on this repository.

What's Google Foobar?

Google Foobar is a timed coding challenge you can receive from Google if you're caught looking up programming terms using their search engine! I got my invitation while looking up documentation for the Python standard library, and used it as an opportunity to sharpen my Python skills.

You get given a time limit for each challenge, ranging from a day to a few weeks, and your code is run against hidden test cases — including how fast and memory-efficient it is!

I completed this challenge, and have no work left to do on it unless Google sends me more.

Disclaimer

The code on this repository is for educational purposes. If you are taking the Google Foobar Challenge and on this repository, I encourage you take my test cases and look into the algorithms I list in each subsection below.

You are doing yourself a great disservice if you just copy/paste my solutions, and I have intentionally left a few files that do not work on this repository.

The Challenges

Level 1

This level had a problem about counting duplicate occurrences of characters in a string.

Level 2

In this level, I was confronted with the Knight's Shortest Path Algorithm, and Array Multiplication with a lot of conditional cases to account for.

Level 3

On this level, the challenges began to become more complicated. I encountered Breadth-First Search with conditional passthrough, Euler's Distinct Partitions, and a Lucky Triplets problem.

Level 4

On this level, I dealt with a Combinations problem, and an instance of the Traveling Salesman Problem.

Level 5

This level was the hardest by far, and took me to the whiteboard. I dealt with Cellular Automata Pre-imaging, and had to go read some academic papers to solve this one.

Secret Follow-up Challenge

While not a formal level of the coding challenge, I encountered a fun Cryptography challenge at the end. If you get this far... you should know what to do!

My Whiteboard

Can you guess what challenge this was?

Whiteboard