0
Whatâs the best way to address this problem?
you are one the NBAâs top executives and with the playoffs starting, you want to make sure that the league has prepared enough basketballs to go around. Youâve received word from your assistant that the league will need to prepare X amount of basketballs, each with a unique radius R for the playoffs. You immediately rush to your warehouse and measure it to be L by W by H. Write a program that determines whether or not the basketballs will fit inside the warehouse. Assume that the balls can be deformed.
1 Answer
+ 3
that the balls can be deformed means that you can squeeze them so that no empty space is left between them.
the volume of your warhouse is w=L*W*H
volume of one basketball
b=(4Ă·3)*pi*r*r*r
number of basketballs that can fit
n=wĂ·b
write the code in your preferred language.