• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
kSquared

Google Interview Questions

80 posts in this topic

Since you are still alive, I assume somehow your biology was preserved. So that means your muscle mass is still in proportion to your total mass. Thus, my solution would be to jump out. Should I fail to make the jump, I would probably punch a hole in the blender upon my landing. Or if the blender was on its side, I would walk out. Or jump against the side, knocking it over. Considering my density/size ratio, I wonder if I could chew through the blades.

Hell, if you shot me at 2000 feet per seoond I could probably be used as an anti tank bullet.

Why such a complex stack growth solution. In a function, declare 2 local variables. Compare addresses.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Witchcraven
Since you are still alive, I assume somehow your biology was preserved. So that means your muscle mass is still in proportion to your total mass. Thus, my solution would be to jump out. Should I fail to make the jump, I would probably punch a hole in the blender upon my landing. Or if the blender was on its side, I would walk out. Or jump against the side, knocking it over. Considering my density/size ratio, I wonder if I could chew through the blades.

Hell, if you shot me at 2000 feet per seoond I could probably be used as an anti tank bullet.

Why such a complex stack growth solution. In a function, declare 2 local variables. Compare addresses.


Only that it was stated that your mass is also reduced accordingly.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Raduprv
Why would it kill the motor? Placing too much load might kill it, but too little wouldn't.
I assume they are designed to be run with some resistance. Sort of like if you run a water pump motor dry, it will burn out. Also, I just read somewhere that they may be designed for short use time spans, and not continuous use, so they could burn out that way too after 10 or so minutes.

[disclaimer]I don't even own a blender! What do I know!?[wink]
0

Share this post


Link to post
Share on other sites
The water pump is different: the motor needs the water to cool itself. For a blender, it doesn't matter, because the motor cools itself with air.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Raduprv
The water pump is different: the motor needs the water to cool itself. For a blender, it doesn't matter, because the motor cools itself with air.
I wonder for how long though. I suspect an average would tend to overheat at some point given the high RPM.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by kSquared
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?"


Clearly they mentioned nickels for a reason. Simply use a now proportionately huge piece of pocket change to jam the blades in some way. :D
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Cold_Steel
Quote:
Original post by Raduprv
The water pump is different: the motor needs the water to cool itself. For a blender, it doesn't matter, because the motor cools itself with air.
I wonder for how long though. I suspect an average would tend to overheat at some point given the high RPM.


Many motors (big motors) have some sort of fan/propeler inside, so they draw air to cool themselves. Besides, if a motor is idle it will heat slower. But it depends on the motor, of course. Some are designed to run non stop, while others are designed to run for a limited time. A cheap blender will probably die if used too much, but a well build one will most likely run for quite a while.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Raduprv
Many motors (big motors) have some sort of fan/propeler inside, so they draw air to cool themselves. Besides, if a motor is idle it will heat slower. But it depends on the motor, of course. Some are designed to run non stop, while others are designed to run for a limited time. A cheap blender will probably die if used too much, but a well build one will most likely run for quite a while.
Yeah, Google should at least tell you what brand they're using. There's a big difference between a high quality restaurant blender and a Wal-Mart POS.
Heh, you know what, I think I know how to answer all of Google's interview questions:
[google]
0

Share this post


Link to post
Share on other sites
[quote]Original post by kSquared
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?"

Ehh. Well I make alot of smoothies and stuff with blenders.. hehe.. ok.. watch if you drop a granola (or rice or something) on the blade just as you turn it on. It will shoot itself out of the blender (hopefully, sometimes it richochetes all over the place before flying out).

My guess is if you are that small, get on the blade and just as the blade turns on jump and you will ping pong right out of the blender and land about 20 feet somewhere arbritraily in your kitchen. Of course you will probably be dead anyways from slamming into the blender walls and flying all that distance...

Why do they ask questions like this anyways?

Oh, oops, I forgot it is usually because it is hitting the blades :-) My bad. I'd just google for the answer.

They didn't mention if it has a top on it though.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Witchcraven
Why such a complex stack growth solution. In a function, declare 2 local variables. Compare addresses.


Agreed. Of course, you will have to watch out for the optimizer reordering things. So you'll want to do it in assembly. (Of course, if you knew how to program in assembly on that platform, you'd probably already know the stack direction... :s )
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.


What if the parameters are passed in registers?
0

Share this post


Link to post
Share on other sites
Then it's a fastcall calling convention. Is there a language where you can't choose to pass data on the stack? (don't say Java)

My point was to reduce the number of steps to find a solution. kSquared said call a function and another function in it. Someone else said declare two local vars. It seems to me that in any language that has those capabilities also has the capability of just doing:

void __cdecl lol(int a, int b)
{
print(&a);
print(&b);
}

But really I was just being a smart ass.
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
Ironically, google doesn't know the answer to "how many gas stations in the us" (I just tried).
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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?
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0