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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi, My name is Dinesh.I want to prepare for ISTQB certification , So can anyone please email me the syllabus of it and what is criteria for giving exam.Please email me answers at: dinesh0323@live.com

5220


On login window for username and password auto populated field means what !

1794


need answer interviewer will ask me about all project which i mention in resume or presently i'm working??please reply tomorrow is my interview

2076


What is Difference between Test Strategy and Test Methodology?

2315


What do you mean by Unit Testing, Integration Testing, System Testing, and User Acceptance Testing and when do you do them?

8093


i need manual testing interview questions for 2+ experience plzz help me..

4564


What icon is used in WinRunner to get an explanation of the syntax of TSL?

2074


Write a set of test cases to test youtube?

7709


What r the documents required for performance testing

2291


How the application is launched to the production environment?

1682


When have you had to focus on data integrity?

2647


In our project, we use Withdrawal Indent, we are confused to use heading as "Withdrawal Indent" or "Withdraw Indent". Please suggest me which one to use ASAP, Thanks in advance

2030


In Manual testing how to test proxy servers? can u please explain with example?

2091


Can you explain tailoring?

1186


i heard that mainframe testing is diff from other environments & has lot of keyboard input????pl clarify my doubt & let me know in what way its diff??

2111