## Microsoft Interview Question for Senior Software Development Engineers

• 2

Country: India
Interview Type: In-Person

Comment hidden because of low score. Click to expand.
11
of 11 vote

Let the probabilty of passing of bus in the time intersection of 5 min be X.
Then the probabilty of not passing of bus in the same 5 minute intersection is Y=1-X.

Let the bus not pass for 4 '5 min intersection', i.e, for 20 mins.
The probablity of above will be Y^4.

Then as per question,

1 - Y^4 = 0.9
Y^4 = 0.1
(1-X)^4 = 0.1
X = 0.4377

Comment hidden because of low score. Click to expand.
0

Shouldn't it be

``(1-Y)^4 = 0.1``

?

``(1-Y)^4``

is the probability that the bus would NOT pass for 20 mins.
0.9 is the probability that the bus WOULD pass in 20 mins.

Comment hidden because of low score. Click to expand.
0

You do say

``(1-X)^4 = 0.1``

Comment hidden because of low score. Click to expand.
1
of 1 vote

The first solution is correct if the bus can only arrive once during the 20 minute period. The second is correct if the bus can arrive once during each 5 minute time slot.

The problem as stated is incomplete and requires further information for a definitive solution to be given.

Comment hidden because of low score. Click to expand.
0
of 0 vote

A continuous probability question. Divide 20 min of time in 5 min time slots. So 4 such time slots. Bus may pass through intersection in any one of the 4 slots. So probability that the bus passes through intersection in first 5 min is 0.9*1/4 = 0.225.

Comment hidden because of low score. Click to expand.
0
of 0 vote

Some body can explain why 0.4377 is correct?

Comment hidden because of low score. Click to expand.
0
of 0 vote

Assuming arrival of buses is a poisson process, the interarrival time of buses T ~ exp (lambda min).. lambda unknown.
Now Given P (T <= 20 min) = 1 - exp (-lambda * 20) = 0.9.
=> lambda = 0.115 min
=> P (T <= 5 min) = 1 - exp (-lambda * 5) = 0.43729

Comment hidden because of low score. Click to expand.
0
of 0 vote

Let X be the time taken by bus to come out from intersection. Hence, it will be uniformally distributed in interval (0,b).
P(X <= 20)=0.9 which implied b= 20/0.9. Therefore, P(X<= 5)= 0.9*5/20=0.225.

Comment hidden because of low score. Click to expand.
0
of 0 vote

Let,
p(5) : probability of seeing no bus in 5 mins.
P(10): p(5)*p(5) = p(5)^2
similarly, p(20) = p(5)^4
also,
1-p(20) = probability of seeing bus in 20 mins
1-p(20) = 0.9 ....(given in question)
p(20)= 0.1
but, p(20) = p(5)^4
hence p(5) = p(20)^1/4
p(5) = 0.1^1/4 = 0.5623
p(seeing a bus in 5 mins) = 1- p(seeing no car in 5 mins)
p(seeing a bus in 5 mins) = 1-0.5623
p(seeing a bus in 5 mins) = 0.4377

Therefore probability of seeing a bus is 0.4377

Comment hidden because of low score. Click to expand.
-1
of 1 vote

Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

### Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

### Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.