## Interview Question

## Interview Answer

23 Answers

Determine the volume of the room. For example if the room is 10ftx10ftx10ft the volume would be 1000ft cubed. The average mens basketball has a diameter of 25cm. There is approximately 30cm in a foot. Therefor you could fit one inflated basketball in a 1 foot cubed space. Therefor you could fit 1000 inflated basketballs inside a room with a volume of 1000 ft cubed.

If we can deflate the basketballs and flatten them down to one inch thick, this would allow us to place 12 flattened basketballs in a 1 foot cubed space. Therefore you could fit 12,000 basketballs in a room with a volume of 1000 ft cubed.

It would be more complicated depending on the shape of the room but the process for figuring out the solution would be the same.

Actually, what you want to do is figure out the ratio of the diameter of the basketball to a full foot. Basketballs are 10 inches, and 10 is .8333 of 12. Remember that, then figure out the volume of the room by multiplying height by width by length---divide this number by .8333. BAM.

So, if its a room of 12 x 10 x 8, you get a volume of 960. Divide by .8333. 1152 is your answer. And this will get it quickly.

Oops, I didn't tightly pack the basketballs, it would be closer to 1728 inflated basketballs if they were all tightly packed in a 10ftx10ftx10ft room.

The correct answer is 1. You only said "basketball" in the question.

The actual question is: "How many basketball[s] can you fit in this room”

my take on this as follows:

1. Assume the size of the room 10' (ft)x 10' x 10' = 120" (inch) x 120" x 120" = 1728000 cu inch

2. size of the Basketball = 9" (inch) x 9" x 9" = 729 (basketball size ref @ http://www.nba.com/canada/Basketball_U_Game_Court-Canada_Generic_Article-18039.html)

3. 1728000 / 729 = 2370.370 ~ 2370 Basketballs (you cannot add 0.370 balls)

Thanks

Instead of working it out, anyone ever replied with something along the lines of: I'm sure you don't need to know how many basketballs can fit in here. Why don't we skip this question and save some time?

I can put infinite number of basketballs, as long as I can keep enlarging the room. I don't need to do all the math or know the size of the basketball (which can be very small anyways - given the current technology I assume people can make a "basketball" in nano scale?

Your are assuming the room is "empty"... What about you and the interviewer and the desk and the chairs and so forth. Those things take up space as well. Think about it.

Because a basketball, like most matter in the universe, is comprised of 99.9999999% empty space (really, just a few atoms bound together by a "gluing" force we know little about, separated by empty space), if you manage to make a basketball dense enough, you could fit nearly an infinite number of them into any room.

I wouldn't want to be around when that happens, because such things tend to create their own gravitational pulls, and event horizons.

Between 1 and 1 million basketballs. You did not specify your error tolerance or accuracy requirement. It is always a mistake to jump to conclusions and provide answers without collecting data and doing the backup analysis.

Google it.

not too many if we want to adhere to fire code requirements. let's google the local FD and ask for guidance.

An infinite number if the door is left open.

I can fit more basketballs in this room than beach balls, but certainly less than footballs or baseballs.

I guess that highest packing efficiency can be achieved if the spheres [or in this case 'basketballs'] are packed in a face centered system. So we can divide the whole room in the number of cubes with each cube's side = diameter of basket ball.

Since one cube contains 4 balls so answer should be = 4 * No of cubes.

Bingo! I guess

Two.

Two basketballs will fit in nicely in the room. Or five. Or 10. Or three. All are valid responses.

The question doesn't ask what is the maximum number of basketballs that could fit in the room.

Think back to high school chemistry. The most efficient packing schemes - hcp and fcc - where spheres nestle in the valley created by the spheres of an adjacent layer, fill almost 3/4 of the available volume - the actual figure is pi/(3*sqrt(2)), a smidgeon over 0.74. That only holds in regions of uninterrupted packing of course; a lack of fractional balls around the edges of the room will introduce complications we can only ignore if the length of the room's sides are all much larger than the ball diameter.

So if the room volume is h*w*l and the volume of the ball is (4/3)*pi*r^3, and {h,w,l} >> r, and the packing coefficient is pi/(3*sqrt(2)), then the number of balls is:

h*w*l * pi/(3*sqrt(2))

-----------------

(4/3)*pi*r^3

after cancelling stuff out this reduces to:

h*w*l

-----------------

4*sqrt(2)*r^3

That's a bugger to do in your head, but if you're happy with an approximate packing density of 3/4 (close enough since the aforementioned edge effects will make the true value arbitrarily lower anyway), you can arrive at this simplified and much more memorable formula for the number of basketballs::

volume of room * sqrt(2) / volume of basketball-sized cube

I can fit in just one basketball in the middle of the room and enjoy watching it! Or, I can maybe order one large basketball the size of the room, get it inside the room and inflate it till it fills the room...like MM said, it's a question of how many and not what's the max no of basketballs one can fit in that room

With a gleam in my eye and a wry smile, I'd ask, "When is your next vacation?"

I'd give out any random number lets say 100... If he say I counted and thats what is the answer (confidently). If he denies then ask him to prove you wrong by getting 100 basketballs :D

say a big number based on the room if they ask how or y tell them to check it out.......

I would ask myself how many basketballs I have first.

## Add Answers or Comments

To comment on this Question, Sign In with Facebook or Sign Up

Depends ... should we assume they're inflated?