Advertisement

Google Interview Questions

Started by February 08, 2005 05:19 PM
79 comments, last by way2lazy2care 13 years, 5 months ago
Push a value into a stack, and subtract the stack pointers current value from the stack pointers value before you pushed the value.

If it is positive then the stack is going up, otherwise it is going down.

You then pop it back again (to return the stack to its origional state)

Also, for the blener one, i would go something like:
Resonate the glass until it shatters, then run away real fast.

For "how many gas stations in the us"? I would say, "Google it".

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Ironically, google doesn't know the answer to "how many gas stations in the us" (I just tried).
Advertisement
Quote: Q: "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?"

Panic, because the rest of the ingredients are probably coming in a few seconds.

Quote: Q: "How would you find out if a machine's stack grows up or down in memory?"

Give it appropriate amounts of sunlight and water, and record observations over time.

Quote: Q: "Explain a database in three sentences to your eight-year-old nephew."

Well, basically it's a.... Wait a minute, who are you? I don't have an eight year old nephew.

Quote: Q: "How many gas stations would you say there are in the United States?"

I don't know, but when I see him next, I'll ask.
Quote: Original post by Coaster Kev
Why not ask Google ... err... yeah

Funny Google Response


Why do Google want to shrink my donkey?

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Quote: Original post by benryves
Quote: Original post by Coaster Kev
Why not ask Google ... err... yeah

Funny Google Response


Why do Google want to shrink my donkey?

Yeah, your donkey, right....

They just want you to get in shape, that's all.

shmoove
Quote: Original post by golopart
LOL. You don't need to do any of that. Make a function. If the function has the C calling convention then parameters on the right of the prototype will be pushed on first. Compare the address of two parameters. If the lefter parameter has a smaller address then the stack grows from high to low memory. Adjust according to calling convention. Newbies.

I would fire you just for using the word "lefter" alone. =P
- k2 "Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
Advertisement
Quote:
Q: "How would you find out if a machine's stack grows up or down in memory?"

The correct answer is "Check the documentation."

Who's more valuable: The guy who can come up with some hack to calculate the value, or the guy who knows where to look up the value?

CM
Quote: Original post by Conner McCloud
Quote:
Q: "How would you find out if a machine's stack grows up or down in memory?"

The correct answer is "Check the documentation."

From earlier:

Quote: Any intermediate questions that I asked for clarification or otherwise have been omitted.


I asked about that ("Is there a handy reference manual available somewhere?", and the response was "Your co-worker has a wobbly desk and is using it to prop it up right now." Heh, heh. At least Google has a sense of humor.
- k2 "Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
My Comp Sci teacher once passed around this little application for google. It had some wierd stuff, though it makes it all the more interesting to work there:

1) Calculate the Resistance in ohm's that a knights move would require on an infinite plane of resistors(forgot the resistance of each resistor, or whatever).

2) What is the most beautiful equation you have ever seen? Explain.

3) You have 10,000 Apache servers, and 1 day to generate $1,000,000. What do you do?

And some other stuff.
Quote: Original post by Sagar_Indurkhya
3) You have 10,000 Apache servers, and 1 day to generate $1,000,000. What do you do?

Sell them for $100 each?
Don't Temp Fate..

This topic is closed to new replies.

Advertisement