Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


If we have 9 floor n 3 eggs n we have to check from which floor the egg wont get break.how can we do that



If we have 9 floor n 3 eggs n we have to check from which floor the egg wont get break.how can we do..

Answer / saurabh dhande

To find the floor from which the egg won't break, you can use a modified binary search algorithm. Here's a step-by-step explanation of the process:

Divide the building into intervals: Begin by dropping an egg from the middle floor (floor 5 in this case if there are 9 floors) using the first egg. If it breaks, then you know the critical floor must be below this floor. If it doesn't break, then you know the critical floor must be above this floor.

Determine the next interval: Based on the result of the first drop, you now have two sub-intervals left to explore. If the egg didn't break in the first step, you will drop it from the middle floor of the upper sub-interval (floors 6 to 9 in this case). If it breaks, you know the critical floor is one of these upper floors. If it doesn't break, the critical floor must be one of the lower floors (floors 1 to 4).

Continue dividing the intervals: Repeat the process until you narrow it down to a single floor. To do this, you will use the second egg as a safety net in case the critical floor is at the very top. This way, you minimize the number of egg drops required.

By following this approach, you should be able to find the critical floor with the minimum number of egg drops. The maximum number of attempts required using this method is 4 in the worst-case scenario.

In this specific example with 9 floors and 3 eggs, you can find the critical floor in at most 4 attempts.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Manual Testing Interview Questions

user A done some changes for a portion of test case doc. And user B also done some changes to same portion. If user-A checks in his file first then user-B. Then what is the state of that file?

2 Answers   AZTEC, TCS,


13. If you were to envision your ideal Web accessibility Web site, what sorts of information would it contain? What would it look and act like? How would it be organized?

0 Answers  


Why is it impossible to test a program thoroughly or in other terms 100% bug-free?

0 Answers  


How many testcases have you written till, now as an average per project?

1 Answers   AppLabs,


Can you do system testing at any stage of sdlc?

0 Answers  


If you are the Test Team Leader and one of the Team Member is not supporting and not working according to your expectations what would you do? how will u handle him?

3 Answers  


Explain the Pros and Cons of testing the software by Developement team and by testing team?

2 Answers   Persistent,


Hi I am searching job please send some details abuot ERP project and real time test plan,traceability report,test case if any relate to erp project Please help me out to get a job in testing.my email address is chiku_69@yahoo.in Thank u

0 Answers  


what is equivalence boundary

7 Answers   Deloitte,


what is the format of test report?

2 Answers  


what is Gui testing and how is it performed

2 Answers   HCL,


What is the full form of cmmi?

0 Answers  


Categories