@sumeet1489 sir if you remember someone once asked the question about 2 eggs to test from 106 floors building to test the lowest floor from where the eggs will break in the minm no. of attempts ? if someone is still looking for the soln i have one. or it has been answered? anways people can still try this qn and i will post the approach later
@sumeet1489 sir if you remember someone once asked the question about 2 eggs to test from 106 floors building to test the lowest floor from where the eggs will break in the minm no. of attempts ? if someone is still looking for the soln i have one. or it has been answered? anways people can still try this qn and i will post the approach later
Google Interview Question n-1 + n-2 + ...........+ 1 >= 106 find the value of n for t his.
Google Interview Questionn-1 + n-2 + ...........+ 1 >= 106find the value of n for t his.
gyro bhai i know the answer its 14 i am just waiting for someone to post their approach , then i will post mine. anyways why does this thread seem so dull. cat window is over so no one wants to be here....well thats strange. why dont you post your approach
gyro bhai i know the answer its 14 i am just waiting for someone to post their approach , then i will post mine. anyways why does this thread seem so dull. cat window is over so no one wants to be here....well thats strange. why dont you post your approach
Google Interview Questionn-1 + n-2 + ...........+ 1 >= 106find the value of n for t his.
n>=16..... this question I believe is to check attention for details. The series starts from (n-1) and not n.
1+2+3.....+14+15 = 120. so n-1 >= 15
=> n >= 16.
This happens a bit too often in coding, especially when we use counters and programmers often mess up when to stop.....when counter = n, or n-1 or n+1. All of us who have done some amount of algorithmic coding some time will agree with this.
lol i didnt do any research on it we heard of it during Mu-sigma interviews and yeah the basic approach goes like n(n+1)>=100 minm comes out to be 14
so first we take the 1st egg and drop it from 14 if it breaks then the top limit is 14 to chk lower limit we may have to go from 1st to 13 floors so total of 14 trials
case2 if it does not breaks at 14th then we go for 14+13th floor to decide the upper limit and to chk the lower limit we chk from 15th to 26th
then 14+13+12th ...so on this way we can see in each case we use two eggs to chk upper limit first and then the lower limit and in each case the no. of drops required will only be 14.
lol i didnt do any research on it we heard of it during Mu-sigma interviews and yeah the basic approach goes like n(n+1)>=100 minm comes out to be 14so first we take the 1st egg and drop it from 14 if it breaks then the top limit is 14 to chk lower limit we may have to go from 1st to 13 floors so total of 14 trialscase2 if it does not breaks at 14th then we go for 14+13th floor to decide the upper limit and to chk the lower limit we chk from 15th to 26ththen 14+13+12th ...so on this way we can see in each case we use two eggs to chk upper limit first and then the lower limit and in each case the no. of drops required will only be 14.
Yahi explanation dia hua h us link pe bhi..nothing different..The link was given just to provide the algorithm for the same..:)
A 25 ft long ladder is placed against the wall with its base 7 ft the wall. The base of the ladder is drawn out so that the top comes down by half the distance that the base is drawn out. This distance is in the range: A. (2, 7) B. (5, 8) C. (9, 10) D. (3, 7 ) E. None of the above