Блог пользователя SuprDewd

Автор SuprDewd, 8 лет назад, По-английски

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
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

But there is only terminal.

how to get to questions>

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +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.

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How about C++ or other language ??

»
8 лет назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

~ Proceeds to learn Python ~

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +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.

»
8 лет назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

it's not so tricky to get interviewed by google. They interview almost everyone. It's tricky to get hired by google.

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +34 Проголосовать: не нравится

    wow, almost everyone !?

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +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)

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +20 Проголосовать: не нравится

    Almost anyone? I didn't get a reply until I got a referral by someone from google...

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      I got interview after participating in Google Code Jam and I was far from being a winner =)

      • »
        »
        »
        »
        8 лет назад, # ^ |
          Проголосовать: нравится +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?

        • »
          »
          »
          »
          »
          8 лет назад, # ^ |
            Проголосовать: нравится +8 Проголосовать: не нравится

          If you register I think you'll get an email when the qualification round starts. (Registration just opened a couple of days ago)

        • »
          »
          »
          »
          »
          8 лет назад, # ^ |
            Проголосовать: нравится +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.

          • »
            »
            »
            »
            »
            »
            8 лет назад, # ^ |
              Проголосовать: нравится 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 :)

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится 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 :)

»
8 лет назад, # |
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"

Proof: http://i.imgur.com/pFxzMlk.png

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    What is a referral link used for?

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      its a link that you send someone and they get instant access to foobar, without going through the trouble of triggering it themselves

      • »
        »
        »
        »
        8 лет назад, # ^ |
          Проголосовать: нравится 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.

        • »
          »
          »
          »
          »
          8 лет назад, # ^ |
            Проголосовать: нравится 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

          • »
            »
            »
            »
            »
            »
            8 лет назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            I tried to do that multiple times, still to no success, but well, thanks anyway!

  • »
    »
    8 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

    Decrypting the message is worth it only if you're doing it for fun :)

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Doesn't seem to work for me, tried Firefox and Chrome :/

Do I have to be logged in?

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    yes

  • »
    »
    8 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    It didn't work for me either even though I was logged in.

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Yeah, was logged in too :s

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      I was finally able to get it in private mode (not logged in) in Firefox :)

      • »
        »
        »
        »
        8 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        How long did it take and how many tabs did you open?

        • »
          »
          »
          »
          »
          8 лет назад, # ^ |
          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 :D

          So I suggest trying on different days, good luck :D

          edit: funnily I can now only reaccess foobar from private mode

»
8 лет назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

What happens if you don't solve the problem within the time window?

»
8 лет назад, # |
  Проголосовать: нравится 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?

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 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.)

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится +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.

»
8 лет назад, # |
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 cd

Thanks in advance.

I found how to do it, thanks anyway.

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I was able to open terminal also solved one problem. Till what time terminal would be accessible?

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 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.

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      Can anyone confirm that you do actually have one week to solve the next/remaining problems?

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится +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.

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится 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?

»
8 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Anyone getting "Error compiling the code, please try again later" (java) on the second round? It compiles on my local machine.

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Yes me Have you found the problem ???

    • »
      »
      »
      7 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Please tell whats the issue? Why is it saying "Error compiling the code, please try again later" (java)"?

      • »
        »
        »
        »
        7 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        you need not to take input from console just make a function like you do in Topcoder SRM.

»
8 лет назад, # |
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?

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 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.

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится
      1. Regarding problem statement: the link has it
      2. 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.
      • »
        »
        »
        »
        8 лет назад, # ^ |
          Проголосовать: нравится 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.

        • »
          »
          »
          »
          »
          8 лет назад, # ^ |
          Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

          Are you talking about this problem or did I miss something?

          • »
            »
            »
            »
            »
            »
            8 лет назад, # ^ |
              Проголосовать: нравится 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?

            • »
              »
              »
              »
              »
              »
              »
              8 лет назад, # ^ |
              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(2n).

              • »
                »
                »
                »
                »
                »
                »
                »
                8 лет назад, # ^ |
                  Проголосовать: нравится 0 Проголосовать: не нравится

                Ah, OK, I missed the part about n being even in the problem you posted. But yeah, interesting.

»
8 лет назад, # |
  Проголосовать: нравится 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

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Check constraints.txt, maybe you use a Java 8 feature?

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 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.

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      thanks

      • »
        »
        »
        »
        8 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        I am a little worried though. It has already been a full day and it still will not work!

        • »
          »
          »
          »
          »
          8 лет назад, # ^ |
            Проголосовать: нравится 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.

          • »
            »
            »
            »
            »
            »
            8 лет назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            I have no more hope left for Google.

            • »
              »
              »
              »
              »
              »
              »
              8 лет назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится

              How do I get help ? Do you have any idea ? Because, I searched for google help for Foober. But there is nothing found.

              • »
                »
                »
                »
                »
                »
                »
                »
                8 лет назад, # ^ |
                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

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  8 лет назад, # ^ |
                    Проголосовать: нравится +3 Проголосовать: не нравится

                  What happens after your time runs out? Are able to login and restart the whole process?

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  8 лет назад, # ^ |
                    Проголосовать: нравится 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.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  8 лет назад, # ^ |
                    Проголосовать: нравится 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 !!!

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  8 лет назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  I didn't use an inner class.

»
8 лет назад, # |
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!!!

:)

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +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!

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится +6 Проголосовать: не нравится

      *You are given days to solve simple implementation task, with unlimited tries, that's how hard to lose

      • »
        »
        »
        »
        8 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Do you have unlimited tries? I was so scared of failing so I tested super thoroughly.

        • »
          »
          »
          »
          »
          8 лет назад, # ^ |
            Проголосовать: нравится +5 Проголосовать: не нравится

          Yes, I can confidently say that.

          • »
            »
            »
            »
            »
            »
            8 лет назад, # ^ |
              Проголосовать: нравится -22 Проголосовать: не нравится

            Fucked in the ass. Once you submit you can't try the same problem. You should be punished!

            • »
              »
              »
              »
              »
              »
              »
              8 лет назад, # ^ |
                Проголосовать: нравится +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)

»
8 лет назад, # |
  Проголосовать: нравится 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.

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    So,finally did you get an interview call (Or what was the response from google)??

    • »
      »
      »
      8 лет назад, # ^ |
      Rev. 2   Проголосовать: нравится +14 Проголосовать: не нравится

      I've got my interview call

      Edit: 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. :)

      1. 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)

      1. 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.

      1. 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.

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Worked for me.. Currently on 4 level.

»
8 лет назад, # |
  Проголосовать: нравится 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?

»
8 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

tgsdfgsdfv

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

After log in with a referal, how much time I have before the referal get expired? Before sending a request command?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +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.

»
4 года назад, # |
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.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I was able to log in today using the method in the post and I did the first challenge so its still active.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 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.

»
4 года назад, # |
  Проголосовать: нравится -25 Проголосовать: не нравится

I got an option to share my codes with recruiter after passing the third challenge of foobar..But I refreshed the page and it got lost..How can I get the option back?