The building

Logic Level pending

You have 2 bouncing balls and a mission.
You have told to find in which floor the bouncing ball will not bounce back (each floor above that floor gives the same result and the ball won't bounce back).

Find the least amount of times you need to check for finding the right floor without failing the mission. Assume the worst case in your answer (see examples)

If the ball didn't bounce back ,you lost him. If you lost the two balls before finding the floor you failed the mission.

I checked the first floor and it bounced back
and then the second floor and so on.
In this way the worst case will be checking 100 times.


Second example (dividing by 2):
I checked the 50 floor. If the ball bounced back I need to check the above floors but if it didn't I need to check the lower floors.
In this way I can lose the second ball in the second try (50 floor didn't bounced back and 25 floor didn't bounced back).



Problem Loading...

Note Loading...

Set Loading...