I interviewed at Google, here are the GOOGLE INTERVIEW QUESTIONS!

Page 8 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

imported_Condor

Diamond Member
Sep 22, 2004
5,425
0
0
So, question Question #3) Given N computers networked together, with each computer storing N integers, describe a procedure for finding the median of all of the numbers. Assume that a computer can only hold O(N) integers (i.e. no computer can store all N^2 integers). Also assume that there exists a computer on the network without integers, that we can use to interface with the computers storing the integers. raises the question:

When I am on line, is GOOGLE useing their computer for processing or MY computer for processing? Probably innocent, but I wonder.
 

Sumotku

Member
Jul 31, 2004
167
0
0
I'd likely use my new strength to weight ratio to climb above the blades using my palms as suction cups against the glass. Get a bit above the blades and the rest should be relatively easy.
 

SinNisTeR

Diamond Member
Jan 3, 2001
3,570
0
0
my cat's breath smells like cat food.

Man, that is some hard stuff. Really makes you feel like you don't know squat. I wonder how many people that actually work for google can answer all of these questions.
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Blender: who cares if you're thrown up and out? You're the size of a nickel. Ever see a small insect die from falling 1 foot? You just don't want to be chopped by the blades.

However, the human body doesn't scale down to that size, so rather than suffer what I'd imagine to be an agonizing death, throw yourself into the blades and end it all.
 

shuttleboi

Senior member
Jul 5, 2004
669
0
0
Last year I interviewed at a number of major companies for software engineering jobs. These companies will ask incredibly in-depth questions, particularly in algorithms and data structures. Here are some typical questions:


Given a singly linked list, devise a time- and space-efficient algorithm to find the mth-to-last element of the list. Define mth to last such that when m=0, the last element of the list is returned.

You are given two pointers to a linked list. One pointer is to the head of the list, and another pointer is to a target node that you need to delete. If you don't care about maintaining the list in any order, how can you delete the target node in constant time?

Suppose you have a binary search tree storing integers. Design an algorithm to determine if the ordering of the data within the tree is correct. (hint: you can define a value, MAX_INT, that is the largest value that can be stored in the tree)

Consider a 32-bit integer with all bits set to 0 except for the 14th bit set to 1. What number is this in decimal and hex? (not a trick question, you just have to know to do it!)

Suppose you have an unsigned short set to -1 and you cast it into a signed integer. What do the bits look like? Repeat the same going from a signed short to an unsigned int.

You are given N numbers. Find the K largest numbers. Do it in faster than O(N K) time.

Write a recursive function to find the ith Fibonacci number. Assume this function works perfectly in a single-threaded program. Now in a multithreaded program, one of the threads calls your Fibonacci function for a large value of i, and then all the threads start crashing. What could be the problem?

Write some C or C++ code to determine if the stack on a computer grows up or down. What if the compiler unpredictably allocates automatic variables?

Suppose you have a function that returns random 64-bit integers without checking if a particular integer has already been used. How many integers would be returned before the probability that an integer has been repeated is above 0.5? (hint: have you heard of the "birthday" puzzle, probably in your statistics class?)

How would you implement reliable, efficient delivery using UDP?

When does a C++ virtual destructor get called?

How do you use 'const' in C++ (two ways)?

What is a C++ virtual function lookup table? Where in memory is it stored?

What is a Unix zombie process? How do you prevent zombie processes? How do you deal with zombie processes?

Suppose you are concerned with a particular file. How can you report to the user that this file has been modified or moved to another volume?

Describe the toughest bug you've fixed.

Describe a difficult interpersonal time you've had working on a team.



 

sjgmoney

Senior member
Apr 28, 2004
219
0
0
Blender answer:

Strap you body with C-4, yell "Allah Akbar" and then jump into the blades, killing yourself and whoever turned the blender on.
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Originally posted by: hypn0tik
6) All points that lie inside the circle of radius 1/4 centered at the centre of the square.

7) {m|5m <= N} Edit: For integer m > 0.

Edited to add answer to #6.

Your answer to question 6 is incorrect. The point lying on the line from the center of the square to any vertex that is the same distance from the center as it is from the edge is not on the circle of radius 1/4.
 

AStar617

Diamond Member
Sep 29, 2002
4,983
0
0
I just had an image in my head of Google's offices... chock full of Rain Men who can answer all those questions instantly but can't make a can of soup :p
 

sjgmoney

Senior member
Apr 28, 2004
219
0
0
Originally posted by: AStar617
I just had an image in my head of Google's offices... chock full of Rain Men who can answer all those questions instantly but can't make a can of soup :p


Or get laid.
 

montag451

Diamond Member
Dec 17, 2004
4,587
0
0
You don't wanna work there.

If all the ppl who work there answered those questions correctly, you would have one big boring time - and you wouldn't wanna make friends with you colleagues.
Imagine the 'fun' nerdy office party.......
 

mugs

Lifer
Apr 29, 2003
48,920
46
91
Originally posted by: chuckywang
Well, am I right for problem 6?

What do you mean by "the shape along the corners"? You're right that it is 4 parabolas, but they're "pointing" toward the sides, not the corners... if that's what you meant. See DrPizza's explanation and my purdy diagrams. :)
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Originally posted by: mugs
Originally posted by: chuckywang
Well, am I right for problem 6?

What do you mean by "the shape along the corners"? You're right that it is 4 parabolas, but they're "pointing" toward the sides, not the corners... if that's what you meant. See DrPizza's explanation and my purdy diagrams. :)

If you draw the boundary such that all points inside the boundary are closer to the center, then the "shape" along the corners of the boundary is a parabola.
 

pmoa

Platinum Member
Dec 24, 2001
2,623
3
81
chuck norris would roundhouse kick google to the head and then they would stare at his beard in amazement and get the job