Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

### SuprDewd's blog

By SuprDewd, 3 years ago, ,

A couple of years ago Google launched an interesting website: Google Foobar. If you try to log in, you'll get an error saying:

To login, you have to have logged in before. Confused? Search on...

Pretty mysterious, right? Well, from what I read on Hacker News at the time, this is some kind of a puzzle set up by Google to recruit Python and Java developers. To get in, you'd simply have to search for the correct phrase. Someone reported that searching for "arraylist java" got him inside, but that didn't work for me.

However, I recently found that searching for this actually gets you inside, but you have to be a little bit patient. Here's what you can do:

1. Open a browser of your choice (it has to be a sufficiently new version so you get the newest version of Google). I've only tested this successfully with Chrome and Firefox.

2. Go to https://google.com/ncr. (The /ncr at the end is to make sure you go to the main version of Google. Don't know if that's necessary, but doesn't hurt)

3. Search for "arraylist java" or "python list comprehension". Other programming-related search terms may also work, but these should definitely work.

4. Here comes the "be a little bit patient" part. Copy the URL for the search results page that you just got (Ctrl+L, Ctrl+C). Now open a lot of tabs with the same URL (repeat Ctrl+T, Ctrl+V, Enter). I'm not sure how many tabs you need to open, but from my experience 10 tabs should be sufficient.

5. Wait for each of the tabs to load. Then go through them, one by one, and look for a tab that contains a black banner saying "You're speaking our language. Up for a challenge?" at the top of the search results. (If you don't get any tab with this banner, try going back to step 1, possibly using a different browser.)

6. Click "I want to play". You're in!

Now you will be presented with a terminal that you can use to solve some competitive programming-style problems using Java or Python. They start easy and become progressively harder, and each problem has a certain time frame you have to solve it within.

When you've progressed to the third or fourth level (don't remember which one), you get the opportunity to send your code to Google recruiters. From what I've read online, this has lead to some people getting an interview at Google. So if you're interested in that, this might be your chance! If not, it's still a bunch of fun problems to solve. :)

• +207

 » 3 years ago, # |   0 But there is only terminal.how to get to questions>
•  » » 3 years ago, # ^ |   +1 If you type ls you will see a list of files, including a file called start_here.txt. Typing cat start_here.txt prints the following:Type request to request a challenge. Type help for a list of commands.
•  » » » 3 years ago, # ^ |   +8 yeah got it and solving 1 quest
•  » » » » 3 years ago, # ^ |   0 I'm doing the first question (Braille_translation_2) right but it always shows failed for test case 4,9 & 10. confused :-(
•  » » » » » 3 years ago, # ^ |   0 hey did you pass that stage? its pretty annoying
•  » » » » » » 3 years ago, # ^ |   0 Nope
•  » » » 3 years ago, # ^ |   0 I can't type anything in the terminal.
 » 3 years ago, # |   0 How about C++ or other language ??
 » 3 years ago, # | ← Rev. 2 →   +5 ~ Proceeds to learn Python ~
•  » » 3 years ago, # ^ |   +5 Java is probably closer to C++ — the syntax is very similar. I think you may find it easier to learn than Python, because I see you use C++ already.
 » 3 years ago, # |   -13 This ain't EARNing the chance of the interview.
 » 3 years ago, # |   +7 it's not so tricky to get interviewed by google. They interview almost everyone. It's tricky to get hired by google.
•  » » 3 years ago, # ^ |   +34 wow, almost everyone !?
•  » » 3 years ago, # ^ |   +34 It depends, probably, but for me it was harder to get interviewed. (I had failed attempt to get interviewed, but got offer from first interview)
•  » » 3 years ago, # ^ |   +20 Almost anyone? I didn't get a reply until I got a referral by someone from google...
•  » » » 3 years ago, # ^ |   +5 I got interview after participating in Google Code Jam and I was far from being a winner =)
•  » » » » 3 years ago, # ^ |   +5 I forget about code jam every year. Hopefully codeforces would remind me this year. If you don't mind, how did you perform in google code jam?
•  » » » » » 3 years ago, # ^ |   +8 If you register I think you'll get an email when the qualification round starts. (Registration just opened a couple of days ago)
•  » » » » » » 3 years ago, # ^ |   +5 Thanks. :)
•  » » » » » 3 years ago, # ^ |   +5 Round 1C 2016 was the last round for me and my rank was 1435.I've sent solution "Senate Evacuation" in 52 minutes and solution for "Slides!" after 2h30m since the start of the contest. I couldn't solve "Fashion Police" even with easy constraints.
•  » » » » » » 3 years ago, # ^ |   0 Oh interesting. I wonder what do they look at(maybe it depends on your CV and location). I have friends who got to round 2, but did not get an interview. Thanks for the info :)
•  » » » » » » » 3 years ago, # ^ |   0 Probably, quality of the code. But this is only my speculation.
•  » » 2 years ago, # ^ |   0 Almost everyone?! I applied a lot in google.com/jobs, advanced to round 3 in google code jam, also solved the challenges in foobar, but never invited to interview by google :)
•  » » » 2 years ago, # ^ |   +8 Try to get referral.
•  » » » » 2 years ago, # ^ |   0 Yeah, I heard about that, but unfortunately I got no friend working there.
 » 3 years ago, # | ← Rev. 2 →   +5 At the end of level 2 you get a referral link At the end of level 3 you get asked for contact information so a recruiter can contact you At the end of level 4 you get a second referral link At the end of level 5 you get an encrypted string that I still have no idea what it means, with a note "for your eyes only"
•  » » 3 years ago, # ^ |   +5 What is a referral link used for?
•  » » » 3 years ago, # ^ |   +5 its a link that you send someone and they get instant access to foobar, without going through the trouble of triggering it themselves
•  » » » » 3 years ago, # ^ |   0 Would you (or anyone) mind sending me a PM with referral link? I'd love to at least see what puzzles they have prepared.
•  » » » » » 3 years ago, # ^ |   0 It is a single-use referral link, I still have one, which I would like to keep for later.Following the procedure in this blog post, I triggered foobar 5 times in 20 tabs. So keep trying and you will get it
•  » » » » » » 3 years ago, # ^ |   0 I tried to do that multiple times, still to no success, but well, thanks anyway!
•  » » 3 years ago, # ^ | ← Rev. 2 →   +8 Decrypting the message is worth it only if you're doing it for fun :)
•  » » » 3 years ago, # ^ |   0 Did you manage to decrypt it?
•  » » » » 3 years ago, # ^ |   0 Yeah, the "for your eyes only" is a key hint.
•  » » » » » 3 years ago, # ^ |   0 your comment now is a key hint for me :p
 » 3 years ago, # |   0 Doesn't seem to work for me, tried Firefox and Chrome :/Do I have to be logged in?
•  » » 3 years ago, # ^ |   0 yes
•  » » 3 years ago, # ^ | ← Rev. 2 →   0 It didn't work for me either even though I was logged in.
•  » » » 3 years ago, # ^ |   0 Yeah, was logged in too :s
•  » » » » 3 years ago, # ^ |   0 Thanks a lot. The private mode works for me, and it only takes one time for me.
•  » » » 3 years ago, # ^ |   +5 I was finally able to get it in private mode (not logged in) in Firefox :)
•  » » » » 3 years ago, # ^ |   0 How long did it take and how many tabs did you open?
•  » » » » » 3 years ago, # ^ | ← Rev. 2 →   0 Yesterday, I tried a lot of tabs logged in and I guess about 40+ in private mode, but it didn't work.Today I tried like 40 tabs logged in, and then 1 tab in private mode and I got it :DSo I suggest trying on different days, good luck :Dedit: funnily I can now only reaccess foobar from private mode
 » 3 years ago, # |   0 https://www.google.com/foobar/?eid=Lqe-WKbbK8KF6ASgr4K4Cg&usg=AG3vBD1K9LsjyhZnRmhCH59BKOiPPEbn9QCan you get in just by following this url?
 » 3 years ago, # |   +18 What happens if you don't solve the problem within the time window?
 » 3 years ago, # |   0 Nothing works for me — tried Firefox, Chrome, both queries too. Maybe that's because I have already applied there several times and Google knows everything?
•  » » 3 years ago, # ^ |   0 It works for me even if I'm logged out and in incognito mode. However, I just tried this on a computer belonging to a non-programmer, and I can't get it working there... So apparently this only seems to work under some special circumstances. (That, or I didn't open enough tabs.)
•  » » » 3 years ago, # ^ |   +8 Well, normally when I do all my coding and stuff I am not logged in my Gmail account, so that is probably the reason.
 » 3 years ago, # | ← Rev. 2 →   0 How to switch to editor? I'm pressing TAB + ESC + ENTER, but when pressing TAB, this comes to screen :verify submit status request ls less help feedback edit deleteme cat cdThanks in advance.I found how to do it, thanks anyway.
•  » » 3 years ago, # ^ |   +6 for future reference, use edit solution.java or edit solution.py
 » 3 years ago, # |   0 I was able to open terminal also solved one problem. Till what time terminal would be accessible?
•  » » 3 years ago, # ^ |   0 Never mind I figured out. It seems like it would be available for a week as I have solved one problem. Its telling you have survived one week in organization.
•  » » » 3 years ago, # ^ |   +1 Can anyone confirm that you do actually have one week to solve the next/remaining problems?
•  » » » 3 years ago, # ^ |   +3 You survived a week in Commander Lambda's organization, and you even managed to get yourself promoted. Hooray! Henchmen still don't have the kind of security access you'll need to take down Commander Lambda, though, so you'd better keep working. Chop chop! I don't think this mean it will be available for a week.
•  » » » 3 years ago, # ^ |   0 I'm pretty sure that you have forever to solve the problems, and the time limit only applies when you request a new one. Why would they limit your availability to the terminal?
 » 3 years ago, # |   +5 Anyone getting "Error compiling the code, please try again later" (java) on the second round? It compiles on my local machine.
•  » » 3 years ago, # ^ |   0 Yes me Have you found the problem ???
•  » » » 3 years ago, # ^ |   0 Please tell whats the issue? Why is it saying "Error compiling the code, please try again later" (java)"?
•  » » » » 3 years ago, # ^ |   0 you need not to take input from console just make a function like you do in Topcoder SRM.
 » 3 years ago, # | ← Rev. 2 →   0 Not sure if this is the most relevant place to discuss problems from it, but can someone who has solved grid zero(with an approximate/non-approximate solution) from level 5 give some hint to their approach? I read it long back but never figured anything out, some googling revealed that the problem is NP hard?
•  » » 3 years ago, # ^ |   0 Also not sure if it's a great idea to be discussing the problems, but just wanted to point out that people seem to be getting different problems, so you'd need to post the statement.
•  » » » 3 years ago, # ^ |   0 Regarding problem statement: the link has it I just googled the problem and found a lot of websites discussing the problem(so I thought it is okay to discuss them), but if it's not okay, please don't reply to my comment.
•  » » » » 3 years ago, # ^ |   0 Sorry, didn't see the link.How big can n be? If it's small, e.g. n <= 15 as mentioned in the link, and BFS is too slow, then bidirectional search would be my next bet.
•  » » » » » 3 years ago, # ^ | ← Rev. 2 →   +5 Are you talking about this problem or did I miss something?
•  » » » » » » 3 years ago, # ^ |   0 I believe he was talking about this problem from Google Foobar. However, it seems to be exactly the same problem, but with a much smaller grid. I guess this problem is not NP-Hard after all, as suggested by the referenced Stack Overflow question?
•  » » » » » » » 3 years ago, # ^ | ← Rev. 2 →   +5 This is if n is even and seems to be very bad if n is odd. If n is even, row[i] + column[j] mod 2 changes only for toggled (i,j), where row[i] is the sum of all elements of row i and column[j] is the sum of all elements of column j.If n is odd it is equivalent to some bad-looking problem. You're given an odd-size matrix A modulo 2. You may invert any it's row or column and the number of (all) inversions must be even. You must minimize the number of zeroes in this matrix. I have no idea how to solve this faster than O(2 n).
•  » » » » » » » » 3 years ago, # ^ |   0 Ah, OK, I missed the part about n being even in the problem you posted. But yeah, interesting.
 » 3 years ago, # |   0 Getting error:-> Error compiling the code, please try again later. in java please help My solution is working on my machine and also on online editors such as codeforces custom input
•  » » 3 years ago, # ^ |   0 Check constraints.txt, maybe you use a Java 8 feature?
•  » » » 3 years ago, # ^ |   0 I am using java 7 in my local computer. It runs successfully but still got the same error. "Error compiling the code, please try again later." What to do now ?
•  » » 3 years ago, # ^ |   0 I'm pretty sure Google compiling is broken. In fact, I tried to judge the exact same code that had compiled and been judged earlier, but it still give error! I think only solution is to wait.
•  » » » 3 years ago, # ^ |   0 thanks
•  » » » » 3 years ago, # ^ |   0 I am a little worried though. It has already been a full day and it still will not work!
•  » » » » » 3 years ago, # ^ |   0 I used java 7 in my computer and run the code here. It worked well in local environment. The test output showed correct result. I waited 1.5 days long according to your statement. But still got the same error. Now I am searching for a solution. please help me.
•  » » » » » » 3 years ago, # ^ |   0 I have no more hope left for Google.
•  » » » » » » » 3 years ago, # ^ |   0 How do I get help ? Do you have any idea ? Because, I searched for google help for Foober. But there is nothing found.
•  » » » » » » » » 3 years ago, # ^ | ← Rev. 2 →   +3 It's already been almost 3 days without working for me, and I only have one hour left for my 3 day challenge. As far as I can tell, it's going to be broken indefinitely. Never knew Google could make such mistakes.UPD: My time just ran out. GG
•  » » » » » » » » » 3 years ago, # ^ |   +3 What happens after your time runs out? Are able to login and restart the whole process?
•  » » » » » » » » » 3 years ago, # ^ |   0 I can still log in and do stuff in the terminal. I read online somewhere that you can request a new challenge, but I am going to wait a week or so before doing it.
•  » » » » » » » » » 3 years ago, # ^ |   0 My code finally works. I guess you used other class like inner class to make a node or something. Foobar server does not allow this. Actually I did it before to make a tree of nodes. But once I removed inner class and used so many variables instead of inner class it works !!!
•  » » » » » » » » » 3 years ago, # ^ |   0 I didn't use an inner class.
 » 3 years ago, # | ← Rev. 2 →   +8 WOW it worked...It felt so cool I thought I was hacking the pentagon or something...too bad I can't write in JAVA or python...Good luck guys!!!:)
•  » » 3 years ago, # ^ |   +6 Why not use it as a motivation to learn the basics of one of those languages? :) The tasks are quite easy at the start and you cannot lose, only win!
•  » » » 3 years ago, # ^ |   +6 *You are given days to solve simple implementation task, with unlimited tries, that's how hard to lose
•  » » » » 3 years ago, # ^ |   0 Do you have unlimited tries? I was so scared of failing so I tested super thoroughly.
•  » » » » » 3 years ago, # ^ |   +5 Yes, I can confidently say that.
•  » » » » » » 3 years ago, # ^ |   -22 Fucked in the ass. Once you submit you can't try the same problem. You should be punished!
•  » » » » » » » 3 years ago, # ^ |   +3 Oh god, I think they made it clear that it's a one time submission. What was unlimited is the verify command, and so far everytime I got AC in verify led to 100% in submission. (Not sure if they will check if the code is flawed manually)
 » 3 years ago, # |   0 I'd like to discuss about the problem "Distract the guards", as I realize that my submitted AC code actually fails in a counter test case that I came up with during reviewing my code.If anyone is interested please PM me, I'd like to hear some thoughts from others on that problem.
•  » » 3 years ago, # ^ |   +5 So,finally did you get an interview call (Or what was the response from google)??
•  » » » 3 years ago, # ^ | ← Rev. 2 →   +14 I've got my interview callEdit: Quite a few people have wrote to me about my situation so I would just put it here, if you want some extra details you are always welcome to PM me. :) How long till you receive email from Google? Around two weeks later, a recruiter wrote to me and confirmed my intention of applying for an internship, and assured me that there will be a phone interview for the next internship recruitment cycle. (For the China region, this is around Jan on each year) Have you solved the levels afterwards? Were there any extra favours? Yes I have solved them afterwards but there was no follow-up email. As other's have mentioned what you will get is another invite link, an encryted message (it is encrypted slightly different for each user), and some feedback forms. Does this stack up with the APAC (or kickstart) test? So far there is no evidence supporting this, but I will update if I have found any traces throughout my pursuit next year.
•  » » » » 3 years ago, # ^ |   0 Nice!!! Congrats.
 » 3 years ago, # |   0 Worked for me.. Currently on 4 level.
•  » » 3 years ago, # ^ |   0 I'm stuck on problem — Bringing a Gun to a Guard Fight
 » 3 years ago, # |   0 Did anyone come across a question on Level 4 that requires to plan the path in such a way that maximum number of nodes should be visited between the starting and ending node in the graph with the constraint being that this has to be done with total weight of the path less than or equal to a given limit, and the path has to end at the end (last) node?For example, if the graph is [[0, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 0, 1], [1, 1, 1, 1, 0]] with the limit on weight of the path being 3, 0th node be the starting node, and 4th node be the ending node, the answer would be [1, 2], i.e. 1st node and 2nd node.I tried using DFS recursively from starting node to get all the valid paths (within limit and ending at last node) and return the path with maximum nodes, but it is slow. Any resource or idea in this space would be appreciated?
 » 3 years ago, # | ← Rev. 3 →   0 tgsdfgsdfv
 » 2 months ago, # |   0 After log in with a referal, how much time I have before the referal get expired? Before sending a request command?
•  » » 2 months ago, # ^ |   +4 I think there's no such defined expiration period of a referral after signing in. Time starts only when you request a challenge. So, don't worry. Request a challenge only when you're actually prepared.
•  » » » 2 months ago, # ^ |   +1 Thank You
 » 5 weeks ago, # | ← Rev. 2 →   0 Does Google still hire through Foobar? I wasn't able to find any new posts on this topic. So I'm just curious to know if this challenge is still active or not.
•  » » 5 weeks ago, # ^ |   0 I was able to log in today using the method in the post and I did the first challenge so its still active.
•  » » » 12 days ago, # ^ |   0 That's good but actually, I wanted to know does Google still hire developers using Foobar? I didn't come across any post that was posted after 2018 about Foobar.