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

What is system level testing?

0 Answers  


diff b/w alpha & beta testing? who will do this with examples? can u pls help in this topics

3 Answers  


pls tell me who is in s/w testing field(either in company or as faculty) give the ans of my que. tel me why r u in testing ? reply me as soon as possible

3 Answers  


I have password field in my application.while entering data into pwd field the characters are not encrypted will it come under gui testing or unit testing? is gui testing checked by typing or entering data into fields?

7 Answers  


developers take most of the time for coding and tester left very few time for testing say 2 days which testing u find best when ur project is run out of time and product is going to be released

3 Answers  






What r the attribute of good software test?

1 Answers  


What is a test server?

0 Answers  


when there are any CRs in the projects, as a tester what do you do?

3 Answers   Satyam,


I entered all the field in a form and b4 clicking the submit button the system goes off...in this senario where is my data stored or it is lost???

2 Answers   SuperValu,


What is the difference between Test Management tools and Defect Management tools? What are the most widely used Test Management tools?

2 Answers   CTS,


Can you explain the various elements of function points ftr, ilf, eif, ei, eo, eq, and gsc?

0 Answers  


when we found problem occured in requirement while writing test case when communicate with client but they not accepting it is problem whether you continue further or not?

3 Answers   Aspire,


Categories