My Experience with Google Foobar Challenge

A month back, while searching for a python query, I was browsing the search results and suddenly the screen split open below the search bar with a greeting that said,
Curious Developers are known to seek interesting problems. Solve one from Google?
Bingo! I just unlocked Google Foobar Challenge!
What is Google Foobar Challenge?
Google Foobar is Google’s secret hiring challenge. The interesting thing about foobar is that not everyone can unlock the challenge, only a few people get the invitation.
Google analyses your search history and reading patterns and if they satisfy certain conditions, they send you the invite. No one knows what these patterns are or how is the challenge unlocked. But what we know is that many developers have been hired through this challenge.
So I clicked the “I want to play button” and it redirected me to a new page with UNIX Shell-like interface. I had to sign to save my progress.
The Foobar challenge consists of 5 levels. Each level consists of some problems for which you have to write a solution in either python or java. The difficulty increases as you level up. After level 3 it asks you to fill in your contact details and if they like your submission, they may contact you for an interview. Let’s go through each level.
Level-1

The first level consists of a single question that was quite easy and can be solved in linear time. After submitting the solution, a bunny started hopping in the shell. Two days later I requested Level-2.
Level-2

It consisted of two questions. Both of them were standard Graph and Depth First Search problems. After completing the level I got a referral link that I could use to invite a friend 😃 , but no bunny animation. 😞
Level-3

It consisted of three questions which were a bit tough as two of them were solved using Dynamic Programming and the third one (My favorite question of the challenge 😍) used a mathematical concept called Absorbed Markov Chain. I learned a lot in level-3 and it was the best level in the entire challenge.
After submission, there was a star wars reference,
The Code is strong with this one…
It then asked me to fill a contact form, which included contact details as well as current academic status. I filled the form and was hoping for a reply but its been three weeks and I haven’t heard from them yet ☹️. I will update the blog if they contact me.
Level-4

This was where things started getting pretty serious. It had two questions one of them was solved using Ford Fulkerson Algorithm and the other was based on permutations. It took me some time to figure out the solution but I managed and on submitting I got another referral link. Fours levels complete, one to go 😅.
Level-5

It consisted of a single question and I was given 21 days to solve it. This was by far the hardest question I had seen. It took me 3 days to understand the question fully and 10 more days for it to pass all the test cases. Upon submitting I got an encrypted message (base64) which upon decoding gave:
{‘success’ : ‘great’, ‘colleague’ : ‘esteemed’, ‘efforts’ : ‘incredible’, ‘achievement’ : ‘unlocked’, ‘rabbits’ : ‘safe’, ‘foo’ : ‘win!’}Conclusion
I learned a lot from the foobar challenge, from data structures and algorithms(DSA) to mathematical concepts. Before foobar, I found DSA quite boring but after unlocking the challenge I had a reason to learn DSA which eventually made me a better programmer 😏.
If you unlock the challenge don’t solve it to simply land a job at google but to enhance your skills. Some people say they have stopped recruiting with Foobar Challenge but who knows😬?