## canmpuppala

BAN USERI guess careersavvy is right if the actual intent of the question is "what is the speed(average) at which the car travelled for 5 hrs? then the answer is (100+98+96+94+92)/5

[Total Distance/Time]

which comes to 96kmph.

But if the question meant what would be the speed after 5hrs,it is 90kmph since the speed falls from 92 to 90 immediately after 5hrs.

As given in the problem,the length of the wooden block is L.Therefore,it should also have a width,let us say,"w"(coz it is a wooden block and therefore,is rectangular in shape).

Hence,the diagonal of the wooden block should be definitely greater than L.Hence,the wooden block should be tilted in a manner so that the tips of the diagonal are touching the land of each square.That is what mentioned by prolific.coder

Even if we consider the speed is given in m/s,then the given speeds are multiplied by 18/5 and we get the following speeds

259.2kmph,230.4kmph and 201.6kmph.So obviously it should not take more than a few seconds to travel 60.82mts(to & fro).

275.69KM

The downhill,plain & regular speeds are given.As we exactly dont know whether the journey from A to B is entirely downhill and B to A as entirely uphill,we just ignore these two speeds.

Therefore,Let D be the distance and k be the average increment and decrement of speed during the to and fro journeys respectively,viz

speed*time=Distance ie

A to B: D=(64+K)*4

B to A:D=(64-k)*14/3(ie 4hrs 40min in fraction)

As D is same,therefore,

(64+k)*4=(64-k)*14/3

=(64+k)/(64-k)=14/(3*4)

solve this to get k=64/13(approx 4.92kmph)

Therefore,D=275.69KM

As A to B and B to A are considered not to be entirely downhill and uphill,the incremental speed(4.92kmph) is less than what is stated in the question 8kmph (ie 72-64 or 64-56)

The answer is x=15 and multiples;y=16 and multiples.(Since the question did not mention anything about the least number required).

Eg x=45 and y=48 also works.

The bet is 63

The expected value for the first time the dice is rolled is 50.50 ie n*(n+1)/2,in this case it is 100*101/2 viz 50.50.

However,as i have a 2nd chance ie i choose this only if the actual value that turns up on the dice during first throw is less than 50.50 which has 50% probability.Therefore, I have 50% chance to get an expected value between 51 to 100 ie 75.50 and 50% chance to retry if the value is between 1 to 50.

In the 2nd try the expected value will be again 50.50

Therefore,the final summary is

Probability Expected Value Calculation

50% 51 to 100(75.50) 50%*75.50

50% Retry 1 to 100(50.50) 50%*50.50

---------------------------------------------------------------------------------------

Sum= 50%*(75.50+50.50)=63

- canmpuppala on January 28, 2012 Edit

The bet is 63

The expected value for the first time the dice is rolled is 50.50 ie n*(n+1)/2,in this case it is 100*101/2 viz 50.50.

However,as i have a 2nd chance ie i choose this only if the actual value that turns up on the dice during first throw is less than 50.50 which has 50% probability.Therefore, I have 50% chance to get an expected value between 51 to 100 ie 75.50 and 50% chance to retry if the value is between 1 to 50.

In the 2nd try the expected value will be again 50.50

Therefore,the final summary is

Probability Expected Value Calculation

50% 51 to 100(75.50) 50%*75.50

50% Retry 1 to 100(50.50) 50%*50.50

---------------------------------------------------------------------------------------

Sum= 50%*(75.50+50.50)=63

yup,go on dividing by natural numbers till the divisor reaches sqrt(n)[This answer is for the non-programming people]

- canmpuppala January 28, 2012yup,but u need to be clear with that question you asked.How do u expect anyone to understand "3 people,avg salary without telling anybody ur salary".Don't say ur interviewer phrased it in the same way.

- canmpuppala January 28, 2012The answer is 7 and the explanations provided above in favor of 7 are absolutely correct.

- canmpuppala January 28, 2012**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.

zglgjg is right.

- canmpuppala January 30, 2012No. of u turns is indefinite,the problem can be identified when there is too short a distance between the trains ie when they are about to collide.