Google Interview Question: how many basketball can you f... | Glassdoor

Interview Question

People Analyst Interview Mountain View, CA

how many basketball can you fit in this room


Interview Answer

24 Answers


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

Walt on Dec 29, 2010

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.

Gorillazilla on Dec 30, 2010

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.

LucyGrey on Dec 30, 2010

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.

Gorillazilla on Dec 30, 2010

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

CM on Dec 30, 2010

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 @
3. 1728000 / 729 = 2370.370 ~ 2370 Basketballs (you cannot add 0.370 balls)


Parminder Sandhu on Dec 31, 2010

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?

Skittle on Jan 2, 2011

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?

DC on Jan 4, 2011

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.

WSSW on Jan 6, 2011

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.

Curtis on Jan 11, 2011

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.

Randy on Jan 11, 2011

Google it.

Sarah on Jan 11, 2011

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

pt on Jan 11, 2011

An infinite number if the door is left open.

Cheryl on Jan 11, 2011

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

Meredith on Jan 11, 2011

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

Dishank on Jan 11, 2011


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.

MM on Jan 11, 2011

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))

after cancelling stuff out this reduces to:


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

Ralph Clark on Jan 11, 2011

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 MM said, it's a question of how many and not what's the max no of basketballs one can fit in that room

SS on Jan 11, 2011

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

Chelle on Jan 12, 2011

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

Nishant on Jan 13, 2011

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

Arjun on May 10, 2012

I would ask myself how many basketballs I have first.

Curtis on Sep 13, 2014

I think the answer is ZERO.firstly if u use standard basketball then by calculation you can get the answer, but its an interview not an exam. n if u try to fit a basketball of the size of room then too some space will be left on the corners.
so i think its ZERO

Vinay on Dec 3, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.