LET'S TALK TECHNICAL

This blog is intended to help people prepare for the job interviews and improve their analytical skills. We have posted difficult datastructures and algorithm questions and puzzles. Interview experiences section is for the people to post their interview experiences.Views expressed here are of their personal and the blog author doesn't take any responsibility for the same.

-

Followers

Jobs

Wednesday, December 5, 2007

audio resume,answers link?

Useful link with interview answers audios.
http://www.midemo.com/validator_online/rep/gads.php?HashCode=10ac8f04c270fbf0fc6bd1d975172f28&gclid=CLLTt-aikZACFQFeQgodLzEaAA

Friday, November 30, 2007

There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner. What is the probability that they don’t collide?

prob of colliding is
= 1st and 2nd moving towards each other + 2nd and 3rd moving towards each other + 3rd and 1st moving towards each other
= (1/2)* (1/2) + (1/2)* (1/2) + (1/2)* (1/2) = 3/4

probability of not colliding = 1- 3/4 = 1/4

If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands?


For continuous clock where hours and minutes hands move continuously then the answer is 7.5 Minutes.
3.25* 30 - 15*6 = 7.5


For discrete clock where minutes hand moves after 60 secs and hours hand moves after 12 mins then the answer is 6 minutes.

Thursday, November 22, 2007

Ratio of boys and girls.

In a country in which people only want boys, every family continues to have children until they have a boy. if they have a girl, they have another child. if they have a boy, they stop. what is the proportion of boys to girls in the country?

Solution:

It doesn't matter how many kids a family has. The odds of having a boy or girl are always the same. So number of boys and girls in the village is same.

Ratio of boys and girls.

In a country in which people only want boys, every family continues to have children until they have a boy. if they have a girl, they have another child. if they have a boy, they stop. what is the proportion of boys to girls in the country?

Solution:

50:50.

probability of a boy/girl is always 2 irrespective of the number of conditions.

for the above problem we can prove it with simple probability theory.

Lets assume P(b) be the probability of having a boy. P(g) be the probability of having a girl.

Total expectation of a boy is equal to (probability of having a boy at first instance + probability of having a girl then a boy + probability of having 2 girls followd by a boy + etc... )
E(b) = 1/2 + 1/2*1/2 + 1/2*1/2*1/2 + ......
it comes down to 1 ( infinite series sum = a/1-r = 1/2/1-1/2 = 1).

E(g) = 0 + 1/2 + 1/4 + 1/8....
it comes down to 1.

It means there are equal number of girls and boys in the village.

Number coding

Assume 9 is twice 5; how will you write 6 times 5 in the same system of notation

Solution:

9 is twice 5. So 5 is 4.5.
6 times 5 should be 6*4.5 = 27

Distance between trains

One train runs from A to B at 105 miles per hour; the other runs from B to A at 85 miles per hour. How far apart were the two trains 30 minutes prior to their crossing?


Solution:

Two trains are 95 miles apart 1/2 Hr before they crossed each other

Relative Speed of the trains = 85+105 = 190MPH

One hour before they crossed, they would have been 190 miles apart.

Distance between the trains 1/2 hr before they crossed would be 190/2 = 95miles

Probability of observing a car

If the probability of observing a car in 30 minutes on a highway is 0.95, what is the probability of observing a car in 10 minutes (assuming constant default probability)?


probability of not observing a car in 30 mins = probabality of not observing a car in first 10 mins * not obs in next 10 mins * not obs in last 10 mins

lets assume observing a car in 10 mins = p

probability of not observing the car in 10 mins = 1-p

probability of not observing the car in 30 mins = (1-p)^3

so (1-p)^3 = 0.05

1-p = (0.05)^1/3.
p = 1- (0.05)^1/3.
p = 1- 0.37
p = 0.63.



Popular Posts