You have 2 identical glass bulbs with you. Bulb
manufacturer has mentioned that each bulb might withstand a
drop of 200 Feet at maximum. Your task is to find the
height at which the bulb breaks ofcourse with minimum
number of iterations.
Assume that you have 200 blocks of 1 foot each which can be
stacked one by one to create a 200 Feet structure to carry
out the test.
Answer Posted / chris uzdavinis
Minor typo in previous answer (#7): it should say ... we
solve n*(n+1) = 200
To help get the mindset of the answer, think of the question
differently at first. Rather than solve for the fewest
number of drops to cover a range, think about a twisted
version of that question: "given a fixed number of drops,
what range can be completely covered?"
Our constraints are we have two bulbs, and we're done once
the 2nd breaks, but if it doesn't break we can use it again.
Given only 1 drop, we can only cover a range of 1. Either
it breaks or it doesn't. (If we go higher than the first
level, we don't know if it would have broken at a lower level.)
Given 2 drops, we can cover a range of 3: first drop on 2,
if it breaks, try 1, if not, try 3.
Given 3 drops, we cover a range 1..6: First drop on 3, if
it breaks, try 1, then 2. If it doesn't break, drop #2 is
on 5. If breaks, try 4. If not, try 6.
Given 4 drops, we cover a range of 1..10:
Start on 4, if breaks, try 1,2,3. If not, try 7. If
breaks, try 5,6. If not, try 9. If breaks, try 8. If not
try 10.
And so on. Thus, for N drops, we start on level N. If it
breaks, start a linear search using the remaining bulb, from
1..N-1. Thus, it took a max of 20 drops. But if it doesn't
break, we try level N+(N-1). If it breaks, start a linear
search from N+1. Otherwise try N+(N-1)+(N-2). etc.
This series is clearly the sum from 1 to N drops.
So now that we know how big of a range we can cover given a
fixed number of drops. But the original question asks us to
cover a range of 200, and find the number of drops required.
We just find the smallest integral value for N such that
sum of 1..N >= 200, which is 20.
I gave the sequence of tests in the previous post.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what three specific job positions do you target from qatar airways group u.k?
IDear sir, I have had a data containing of 4 numbers on daily basis for which I would like to know what is the next comming 4 numbers. Based on that data I would like to find out the next comming numbers. Support needed. regards chandramohan gudivada 09849974512 cm116_99@yahoo.com Example : 4513, 4132, 1465, 2941, 1762, 1432, 3412, 5283, 7261, 2643, 4751, 2581, 6513 .... and what is the next number in the sequence?
what job position/s are you currently holding with your current employer?
how soon can you travel down to start your new job?
foot is related to man in the same way hoof is related to...........
4_4_4_4=22 use all sign of maths
In a soap company a soap is manufactured with 11 parts. For making one soap you will get 1 part as crap. At the end of the day u have 251 such scraps. From that how many soaps can be manufactured?
In rail road there are some stations. Each station should have tickets to all other stations.If they add some new stations they need 46 more tickets.How many stations are there before and after adding the stations?
plz send me aptitude test questions on my email id bpraichur@gmail.com
There is puzzle with the word "CONSTANTINE" and exactly don't know the question if anybody knows the Q&A plz send it ahmed.basha.munna@gmail.com
why should we hire the others waiting to be interviewed?
Three neighbours are there. 1st one lends 2nd and 3rd that many no.of tractors that then already each had.After few months , 2nd lends to 1st and 3rd that many tractors then they had. After a few months 3rd lends to 1st and 2nd that many tractors then they had.Now each of them got 24. Find howmany they had initially?
sir i need catholic syrian bank previous question papers fully. it will be helpful for me to greater extend .please do the needful to me.
Wo kay chej hi jo saal may 1 baar aata hai months may 2 baar aata hai weeks may 4 baar aata hai or din may 6 baar
What is the syllabus for numerical aptitude exam to be held by the United bank of India. Plz inform me through email. Thanking You!