1. Welcome to CowboysZone!  Join us!  Come on!  You know you want to!

Google Pre-Employment Screening Engineering Questions

Discussion in 'Off-topic Zone' started by Sam I Am, Nov 4, 2011.

  1. Sam I Am

    Sam I Am Unfriendly and Aloof!

    31,004 Messages
    2 Likes Received
    1. You are shrunk to the height of a nickel and your mass is proportionally reduced so as to maintain your original density. You are then thrown into an empty glass blender. The blades will start moving in 60 seconds. What do you do?
    2. Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens?
    3. You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. How should he allocate the gold in order to maximize his share but live to enjoy it?
    4. Distance is defined like this : If a, b[j] and c[k] are three elements then distance=max(abs(a-b[j]),abs(a-c[k]),abs(b[j]-c[k]))” Please give a solution in O(n) time complexity


    I applied with Google several years ago. When we got to the compensation negotiation the whole process took a major swing in the wrong direction. They basically offered me 65% of my current salary at the time and offered no bonus.

    I ask them how they could hire people at such a cut in salary. He told me that the rest of the salary comes in perks like open kitchens and other perks they offered around the office. None being financially viably to pay a mortgage of course.

    While I was trying to wrap my head around what he was saying, he said one more thing that made me let him know right then that this employment opportunity just wasn't going to work out. He said and I quote:
    :laugh2:

    I wanted to drop an "F-Bomb You" right then. I just composed myself and said that I didn't think it was the right opportunity for me right now.
  2. Meat-O-Rama

    Meat-O-Rama Vegetarians are so stupid.

    2,251 Messages
    44 Likes Received
    How many interviews did you have to go throw just to get to that point?
  3. AmarilloCowboyFan

    AmarilloCowboyFan Active Member

    2,407 Messages
    22 Likes Received
    I don't know about 40K-50K a year but that would look pretty damn good on your resume when you went to find a real paying job.
  4. Sam I Am

    Sam I Am Unfriendly and Aloof!

    31,004 Messages
    2 Likes Received
    It was my 7th. I had three phone interviews, then four in person interviews.
  5. bbgun

    bbgun Benched

    27,870 Messages
    0 Likes Received
    I've only had one interview question throw me:

    "If you're so good, why aren't you working right now?"
  6. Sam I Am

    Sam I Am Unfriendly and Aloof!

    31,004 Messages
    2 Likes Received
    Were you applying to be Mickey Spagnola's assistant? :laugh2:
  7. BrAinPaiNt

    BrAinPaiNt Brotherhood of the Beard Staff Member

    60,953 Messages
    4,301 Likes Received
    Was you trying to get hired as Spagnola's assistant?
  8. bbgun

    bbgun Benched

    27,870 Messages
    0 Likes Received
    I would live in a cardboard refrigerator box on the streets before I worked for Mickey.

    see above
  9. Cajuncowboy

    Cajuncowboy Preacher From The Black Lagoon

    27,476 Messages
    2 Likes Received
    My answers would be...

    1. You're an idiot. Stay off drugs.

    2. So, you're cheating on your wife and need to know how not to get caught?

    3. You are planing to steal from the company and want me to help devise a plan to get away with it, right?

    4. Ever hear of a GPS?
  10. Meat-O-Rama

    Meat-O-Rama Vegetarians are so stupid.

    2,251 Messages
    44 Likes Received
    Wow, sounds like you got the short and sweet version. I've heard of it taking ten or more interviews.
  11. Sam I Am

    Sam I Am Unfriendly and Aloof!

    31,004 Messages
    2 Likes Received
    Yeah, I've heard horror stories about the Google interview process. (mine wasn't actually that bad) Sometimes you get surprise visitors too. (Page or Brin) Of course, you pretty much have to be in the Mountain View location for those guys to show up. Though, there have been people hired here in NYC that have to fly to Mountain View for an interview.
  12. Seven

    Seven Messenger to the football Gods

    11,281 Messages
    572 Likes Received
    Those are nice. Real easy to add on a room or two.
  13. AmarilloCowboyFan

    AmarilloCowboyFan Active Member

    2,407 Messages
    22 Likes Received
    [youtube]WkdP-yZJCHk[/youtube]
  14. rkell87

    rkell87 Well-Known Member

    7,352 Messages
    124 Likes Received



    #1. run up the side a bit then use the momentum gained to jump to the other side, plant, and jump across again until I can grab the top lip. Then scoot around the top until I get to the handle and shimmy down it. Hang from the bottom of the handle and drop onto the counter and devise a way to kill the guy that threw me in the blender.

    #2. option 1. nothing, every man has cheated on his wife already so every woman already knows at least one man has been unfaithful. option 2. The scenario says nothing about the queen being married so we assume that the only way she would know if a man in that village was unfaithful is if she slept with one, so the women would ask her to identify who she slept with and that man would be killed

    #3. option 1. he is a pirate and he does was pirates do which is kill to get what they want so he kills all of them and keeps 100%. option 2. pirate 5 gets 97 coins, 3 gets 1 coin, 2 gets 2 coins. if you give pirate 4 anything he still won't vote to not kill you because he is next in line to get the lions share of gold. he pays 2 gold to pirate 2 because he needs to have an incentive for the lower ranking pirate to vote for him and that is to pat him more than a higher ranking pirate.

    #4 I have no idea
  15. rkell87

    rkell87 Well-Known Member

    7,352 Messages
    124 Likes Received
    btw what were your answers?
  16. Temo

    Temo Active Member

    3,723 Messages
    15 Likes Received
    1. Assuming that the blender is right side up (so you can't just run out/climb out of it), I'd say this has something to do with knowing how blenders operate. I don't use one, so I don't know: but is there a place in a blender where stuff you put in it doesn't get chopped up?

    2. Using only logic, absolutely nothing would happen, as no wife can prove that her husband has cheated. Unless we're introducing human behavior, in which case the knowledge that 99 men have cheated would probably provoke some communication and ultimately all would be killed. But I suspect that this question has been improperly given, and the actual question is different and actually makes sense.

    3. I will assume that Pirate 5 will have to make an offer, and the offer is solid and the vote final. IE, there is no negotiation. If Pirate 5 is killed, then Pirate 4 stands to make the same choice, same for the rest. Lets go backwards:

    If there are only 2 pirates left, then pirate 2 will be killed right away unless he offers the entire stash to pirate 1, since the rule is "fewer than half", and Pirate 1 can just vote no, kill Pirate 2, and take 100 gold. So Pirate 2 has expected value of 0 coins, while 1 has 100 coins expected value.

    If there are 3 pirates left, then Pirate 2 will of course vote yes (since 2 pirates left=pirate 2 has to give it all to Pirate 1), but will probably require at least 1 gold coin so that he doesn't get mad at Pirate 3 and just vote to kill him (and then go ahead and give all 100 coins to Pirate 1, having at least punished Pirate 3's greed). Pirate 1 will of course vote no regardless, since if Pirate 3 dies, he stands to take home 100 coins. So Pirate 3 should offer Pirate 2 one coin, and take 99 coins for himself. Pirate 3 has expected value of 99 coins, while Pirate 2 has expected value of 1 coin.

    If there are 4 Pirates alive, then Pirate 3 will vote no on anything under 99 coins, while Pirate 2 will vote no on anything under 1 coin, and Pirate 1 will probably vote yes on one coin (since, if we go down to 3 pirates, 1 gets nothing, see above). Pirate 4 will have to offer 2 and 1 a single coin, to get 2/3 to agree with him and avoid getting killed. He has expected value of 98 coins.

    If there are 5 pirates alive, then Pirate 4 will say yes to anything over 0 coins, Pirate 3 will say no to anything under 99 coins, Pirate 2 and 1 will say yes to anything over 0 coins. So to get 2/4 to agree, Pirate 5 must offer 2 coins split between Pirate 1,2, and 3. Pirate 4 is the one who stands to make a ton of coins if 5 dies, so he will say no to just about any deal.

    4. Where n= the number of elements input, the worst-case is something like (n-1)+(n-2)+...+2+1 operations, which gives a total of something like n(n-1)/2 (or whatever the formula is). Regardless, the big-O notation is O(n^2). I think.
  17. realtick

    realtick Benched

    6,986 Messages
    0 Likes Received
    If I'm the hieght of a nickel, then I simply lay down at the base of the blender beneath the blades. I also contemplate my new life in the confines of a blender.
  18. ScipioCowboy

    ScipioCowboy More than meets the eye. Zone Supporter

    14,999 Messages
    2,226 Likes Received
    Here's my answer to the Pirate question:

    Pirate 5: 98 coins
    Pirate 4: 0 coins
    Pirate 3: 0 coins
    Pirate 2: 1 coin
    Pirate 1: 1 coin

    Let's work backwards. Pirate 2 is in the most untenable position. If only he and Pirate 1 remain, Pirate 1 will kill him for any offer under 100 coins.

    Pirate 3 knows Pirate 2's predicament. If there are only three pirates remaining, Pirate 3 will need only one of the other two pirates to agree to his plan. Consequently, Pirate 3 will offer Pirate 2 a single coin and keep 99 for himself. Pirate 2 must take this offer or he won't gain anything.

    If there are four pirates remaining, Pirate 4 will need two of the other three pirates to vote yes on his plan. Pirate 4 will offer Pirate 2 a single coin (the maximum he can hope to get) in exchange for his vote. Unless Pirate 4 offers Pirate 3 the remaining 99 coins, Pirate 3 will vote to kill him and simply take the money. To avoid this fate, Pirate 4 won't offer Pirate 3 anything and instead will offer Pirate 1 a single gold. Pirate 1 will accept this offer, reasoning that Pirate 2 will be forced to accept any deal greater than zero gold coins that Pirate 3 offers him.

    If there are five pirates remaining, Pirate 5 will only need two of the other four pirates to agree to his deal. Consequently, he'll offer the same deal as Pirate 4 would've offered. Once again, Pirate 2 cannot hope to gain anything more than one gold coin. Pirate 1 will also accept the deal, knowing that Pirate 2 must accept any deal greater than 1 gold coin that is offered.
  19. ScipioCowboy

    ScipioCowboy More than meets the eye. Zone Supporter

    14,999 Messages
    2,226 Likes Received
    Either the men are going to another village to cheat, or they're cheating with each other. :p:
  20. rkell87

    rkell87 Well-Known Member

    7,352 Messages
    124 Likes Received
    everything gets chopped up in a blender, the village question is worded right

Share This Page