Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on simple puzzle within the Brainteasers forums, part of the Brain Gym category; hai friends, You are given 2 eggs. You have access to a 100-storey building. Eggs can be very hard or very fragile means it may break if dropped from the ...
|
|||||||
| Brainteasers The coolest place to post puzzles, riddles and brain teasers that tickle your brain. |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
|||
|
simple puzzle
hai friends,
You are given 2 eggs. You have access to a 100-storey building. Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100 th floor.Both eggs are identical. You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking. Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process Thanks Deepa |
| Sponsored Links |
|
|||
|
Re: simple puzzle
Hi friends,
Here v have 2 eggs & access 100 storey building... This is like 2 find out a name "sachin" in phone book ,there v r using binary search(O(log(n)). Which means....... If there r n items ,then after t first decision u eliminate n/2 of them... After t 2nd decision 3n/4 of them and so on.............. Binary search involves decision with 2 choices ,Here a)Break if droped frm t 1st floor. b)may not even break if dropped from 100 th floor. So starts from 100/2=50 th floor....... If breaks........ Then try 50/2=25 th Floor & from 1 st floor to 49 th floor(Binary search technique) next......... 25 th floor(didn't break) try 75 th floor & so on............... Using binary search algorithm v will get... 1+(x-1,x-2,x-3,x-4,x-5,x-6,x-7..............................) ie. (1+x)+(1+x-1)+(1+x-2)+(1+x-3)+(1+x-4)+…………..+1+0=100(floor). Which means 1+x=?????? say 1+x=y then y drops will it take......... which means......... y*(y+1)/2==100 by using BS technique i got y==14; ie: v need 2 make 14 drops.......... so move up 14 then 13, then 12 floors, etc.......... Thanks...... Riju |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple Solving Puzzle.... | psuresh1982 | Brainteasers | 4 | 12 Hours Ago 07:46 AM |
| A simple Puzzle | govindaraj123 | Analytical Skills | 15 | 1 Week Ago 09:29 AM |
| simple puzzle..(funny) | psuresh1982 | Brainteasers | 18 | 08-18-2009 10:05 AM |
| simple puzzle..(funny2) | psuresh1982 | Brainteasers | 6 | 02-05-2007 06:21 AM |
| Simple Puzzle... | jamesravid | Brainteasers | 2 | 08-07-2006 02:39 AM |