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...

There is a 100-story building and you are given two eggs.
The eggs (and the building) have an interesting property
that if you throw the egg from a floor number less than X,
it will not break. And it will always brake if the floor
number is equal or greater than X. Assuming that you can
reuse the eggs which didn't broke; you got to find X in a
minimal number of throws. Give an algorithm to find X in
minimal number of throws.

Answer Posted / ashutosh tiwari

Go to the middle floor, 50 in this case; drop egg, if breaks
go to middle of 1st and 50th i.e. 25th floor otherwise go to
middle of 50 and 100 i.e. 75th floor.

Keep on repeating the method to find the floor in minimum
iteration or egg breaking.

Hope this helps..!!!

Is This Answer Correct ?    5 Yes 25 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

3003


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

1025


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

2029


application attempts to perform an operation?

1916


Are enumerations really portable?

978


Does * p ++ increment p or what it points to?

1054


What does 4d mean in c?

1447


What is a struct c#?

998


How do I determine whether a character is numeric, alphabetic, and so on?

1070


What is an example of structure?

980


How do I create a directory? How do I remove a directory (and its contents)?

1097


Can a pointer point to null?

1021


When c language was developed?

1011


Is python a c language?

947


Explain what happens if you free a pointer twice?

1015