Skip to main content

Everything You Need to Know About Google Foobar Challenge

Google Foobar Challenge for Hiring
Recently, while searching a keyword “headless chrome” on Google I got an unusual pop-up on my window, with a message:
"Curious developers are known to seek interesting problems. Solve one from Google?"
I was surprised to see Google sending me a challenge to solve and I accepted it immediately! Clicking on “I want to play” landed me on Google’s Foobar page.

It was Google Foobar Challenge!
Google Foobar Challenge for Hiring


What exactly is Google Foobar Challenge?

Google Foobar challenge is a secret hiring process by the company to recruit top programmers and developers around the world. And it is known that several developers at Google are hired by this process.

The challenge consists of five levels with a total of nine questions, with the level of difficulty increasing at each level.

What to do after getting the challenge?

After selecting “I want to play” option you land on Foobar’s website which has a Unix-like shell interface, including some standard Unix commands like help, cd, ls, cat and etcetera.
Google Foobar Challenge for Hiring

So, the challenge begins with a sci-fi adventure storyline (in the blue text above). To begin the time-limited challenge we have to enter a request command in the shell.

After requesting the challenge, four files are added in the command-line folder: solution.java , solution.py , readme.txt and constraints.txt which we have to access using cat and ls command (listed in help).
We have a choice to solve the question either in java or python2.7 .
To start writing the code, we have to run the command edit file.py or edit file.java and a code editor will open-up on the same webpage (and save the code using the short-cut keys). We can verify our code at any time by running the verify file command. The code will be verified by running on several test cases of which two are visible and rest are hidden test cases. Once the code has passed all the test cases accurately, we can submit our solution to that question running the submit file command.
Google Foobar Challenge for Hiring

Five levels of foobar challenge

The level of difficulty keeps on increasing as progress further in the challenge.

Level 1: 
This level has only one question, which was pretty straightforward and easy to solve. It does not require any special algorithm to solve it. Forty-eight hours are given to solve this question.

Level 2: 
There are two questions at this stage with the time of seventy-two hours to solve each question. Both the questions were based on the basic principles of linear algebra and mathematics.

After solving both the questions at this level, we get a referral link i.e. we can invite our one friend to take Google Foobar Challenge!

Level 3: 
This is where the challenge starts to get a little tricky. To pass this level, we have to solve three questions with a time of seven days for each question.

To solve these questions, it required a good knowledge of mathematics and programming concepts like dynamic programming, Markov’s chaining, etc.

But you don’t need to worry if you don’t know these concepts, you can always learn these concepts online. Challenge gives you enough time to understand the concept and implement them in the given programming problem. In one of the questions, I solved the problem with the most intuitive method but it was not optimal enough for large values and required implementation of dynamic programming to get the result.
After completing level 3, we are asked to fill-out our details for being contacted by a Google recruiter!

They ask your basic information: name, phone number, email address, country, CV (optional), and if you are a student or a professional.

Google Foobar Challenge for Hiring recruitment form
Foobar Recruitment Form


Level 4:

I found this level the most difficult of all the five. It required the implementation of several concepts to solve a single problem. There are a total of two questions at this level and time of a total of two weeks is given to solve each question. 

Extensive knowledge of algorithms and data structures is required at this level.

The first question was based on the concept of number theory and graphs. I had to implement the Bellman-Ford algorithm in order to solve this question.

It took me a lot of time to understand these concepts and implement them to solve these questions. But I was able to solve both of these questions on time.

After successfully completing level 4 you get another referral link to invite your one more friend to try this challenge!

Level 5:

This was the second hardest problem of the whole challenge and was based on a purely mathematical concept. The final level only had a single question and twenty-two days were given to solve that problem!

The problem required understanding of permutations and combinations and implementation of the Pólya enumeration theorem and Burnside’s lemma. After understanding these two theorems coding part was pretty much simple.

With the submission of this question, the Google Foobar Challenge is completed!

Google Foobar Challenge for Hiring
 Foobar Challenge Completed


After ending the challenge, I got an encrypted string which was easy to decrypt using base64.

import base64
encrypted="THE ENCRYPTED MESSAGE"
my_eyes=str.encode("MY USER NAME")
decoded=base64.b64decode(encrypted)
decrypted=""
for i in range(0,len(decoded)):
  decrypted+=chr((my_eyes[i%len(my_eyes)] ^ decoded[i]))
print(decrypted)

This was the code I used to decrypt the message. The decrypted message was:

{'success':'great','colleague':'esteemed','efforts':'incredible','achievement':'unlocked','rabbits':'safe','foo':'win!'}

What will happen after completing the challenge?

After the successful completion of all the five levels, chances are that you will be contacted by Google's recruiter for an interview.
You may receive an email or a phone call and if you cracked the interview then you can be hired at Google.

How to get Foobar Challenge?

Unfortunately, this challenge is not available to everyone and Google sends it only to specific developers (it may be based on their search history - technical keywords).

Don't worry if you didn't get this invite yet, this is not the only way to get a job at Google.
Don't find Foobar, let Foobar find you!
Google Foobar Challenge for Hiring

Conclusion

I would say this is a great opportunity to learn and I would recommend you to solve the questions if you get an invitation.
While solving the problems don't keep your aim to get hired at Google but to learn the new techniques and experience one of the best coding challenges.
Foobar is more about learning and implementing, instead of knowing everything before!

To improve your code check out our article here.

If you have any queries or comments, please post them in the comment section.

Comments

  1. Thanks for informative content sharing about python.

    python course london

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

  3. I am really very happy to visit your blog. Directly I am found which I truly need. please visit our website for more information
    Data Visualization Service

    ReplyDelete
  4. I have a question. In your blog you have mentioned that we don't need to worry if we don't know the algo, it will give us enough time to learn that algo and then to implement it.
    My question is how can we know which algo/theorem or concept we have to use in the given question? Is this also mentioned in the question or what?

    ReplyDelete
  5. Thanks for the post very useful information its an interesting topic more related topic is available to click hereLoad Testing and Certification In UAE

    ReplyDelete
  6. If you're looking to embark on a transformative journey into the world of programming, Python Training in Gurgaon at APTRON offers an unparalleled learning experience. Python has become a cornerstone in the tech industry, and mastering this versatile language opens doors to a myriad of opportunities.

    ReplyDelete
  7. Embark on a transformative journey into the realm of data with the Data Science Course in Noida at APTRON Solutions in Noida. In an era where data is king, mastering the art and science of data analysis is essential for professionals seeking to stay ahead in their careers. Discover the unparalleled opportunities that await you as you delve into the intricacies of data science in the vibrant city of Noida.

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Choosing the best Data Science course depends on your current skill level, learning style, and career goals. check out Best Data Science course in kochicourse in kochi

    ReplyDelete

Post a Comment

Popular posts from this blog

9 Techniques to Write Your Code Efficiently

(Photo by Oskar Yildiz on Unsplash ) It’s really easy to write efficient and faster code . Efficient code, not just only improves the functionality of the code but it can also reduce the time and space complexity of the programming. Speed is one of the major factors in deciding the quality of the code , for instance, your code might be producing the required result but it takes some time to execute then it will not be considered a quality code. An alternative approach to the same problem producing faster results will be considered better. The code should be clean i.e. comprehensible and readable so that it can be reused (saving the efforts of rewriting the whole program from scratch), adding new features, and making the process of debugging more easier. In this article, I will cover some simple tips and techniques which we can easily apply to make our code more elegant and efficient. "There is always more than one method to solve the problem." How to write code efficie...

Cheatsheet for NumPy: Essential and Lesser-Known Functions

(Photo by  Chris Liverani  on  Unsplash ) Numpy  ( stands for — Numerical Python ) is a library available in Python programming language, supporting matrix data structures and multidimensional array objects. This the most basic scientific computing library that we need to learn, to begin our journey in the field of data science. Numpy can compute  basic mathematical calculations  to make the process of creating advanced machine learning and artificial intelligence applications easier (by using comprehensive mathematical functions available within the library). Numpy allows us to  carry out various complex mathematical calculations effortlessly  along with several top-up libraries (like matplotlib, pandas, scikit-learn, etc.) built over it. This library is a great tool for every data science professional to  handle and analyze the data efficiently . Moreover, it is much easier to perform mathematical operations with numpy arrays in comparison ...

Followers