## Epic Systems Interview Question for Software Engineer / Developers

• 2

Country: United States
Interview Type: Written Test

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

Distance between two building is 106-1 = 105.
Relative Speed (two people moving towards each other) = 10+5 = 15.
Time taken = 105/15 = 7
At the end of seventh minute A would have travelled 7*5 = 35 building. Initially A was in building 1, so they meet at #36.

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

time = 7 should add 1. so the time is 8 minutes

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

Let the movement of person A in time t be described by A(t)
Let the movement of person B in time t be described by B(t)

Deduce A(t) and B(t) from problem statement:
A(t) = 5*t + 1
B(t) = -10*t + 106

Because at time t=0
Person A is at building 1, so A(0) = 1
Person B is at building 106, so B(0) = 106
By inspection Person A must be traversing in increasing building number, and Person B in decreasing building number, hence the sign in the equations.

When the 2 persons meet, A(t) = B(t)
Or:
5t + 1 = -10t + 106
15t = 105
t = 7

So at t=7 min they 2 people meet, and the location is given by
A(t=7) = B(t=7) = 5*7 + 1 = 36

Comment hidden because of low score. Click to expand.
2
of 8 vote

At 36th building @ 8th minute.

Time     A @           B @
1          1          106
2          6          96
3          11        86
4          16        76
5          21        66
6          26        56
7          31        46
8          36        36

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

The question mentioned "Person A is in building 1 and person B is in building 106" . I suppose this is the state at minute-0 and time starts from here. So, they will meet when 7 minutes would've just completely passed.
Time A @ B @
0 1 106
1 6 96
2 11 86
3 16 76
4 21 66
5 26 56
6 31 46
7 36 36

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

The time must be 7 minutes not 8 minutes.Because after 1st minute A will be at 6th position and B will be at 96th position.But u have mentioned that after 1st minute A=1 and B=106 which is wrong.

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

Assuming A and B are going towards each other,
at time t, A is at 1+5t, B is at 106-10t

They meet when 1+5t = 106-10t,
which is at t=7

Replace t in the equations, that's building 36.

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

The assumption that A and B are moving toward each other is very important, hence the upvote. :)

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

36

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

It would be 36 building

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

(106-1)/ (5 +10)*5 + 1 = 36

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

let x be the no of buildings crossed by person A
then 106-x would the no of buildings crossed by B

time taken by both A and B would be same, therefore
x/5 = (106-x)/10
x=35.33
Implies at building no. 36 they would meet

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

It's 1 + (106 - 1) / 3 = 36
That's because B moves with the a speed equal to double the speed of A so they would meet after one third of the road from A or After two thirds of the road from B

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

there are 106-1 = 105 buildings distance from A to B or B to A.
when both meet, their total distance must equal 105. Hence we have this equation:

5P + 10P = 105
<=>  P = 105/15 = 7

A passes 35 buildings,
B passes 70 buildings,
they met at building number 36.

At start : A-------------------------------B
when meet: ----------AB--------------------

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

Let buildings covered by A when they meet = x
Then buildings covered by B when they meet = 105 -x

Both of them will meet each each other exactly after travelling the same time T.
we have Speeds of A and B as,
Sa = 5 building/minute
Sb = 10 building/minute

Time = Distance x Speed, as the time taken is same we could equate Ta and Tb
Ta = Tb
x/5 = (105 - x)/10;
x = 35;

So they meet at 36th building.

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

105/(10+5) is time. loc of A + time*velocity of A is where they will meet. Third grade math.

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

Based on this statement

"The buildings of an office are numbered sequentially. Person A is in building 1 and person B is in building 106. If A crosses 5 offices in a minute and B crosses 10 offices in a minute, at which office number will they both meet?"

I don't know what number the offices are to give a proper answer, as far as what building they would meet at could be answered however but not asked for in this question.

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.