Google Interview Question for Software Engineer / Developers






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

40 meters.

yt / y-8 = (y-10) t / y - 16

y is length of track
t is time in which A finished the race.

- Anonymous August 09, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
2
of 2 vote

Forget about A.
When B goes 8 meters, C goes only 6 meters. Since their speeds are constant, C falls another 2 meters behind every 8 meters that B goes. Since B has left C 10 meters behind in the end, the track has to be (10/2)*8-40 meters long.

- interviewtomorrow September 15, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

suppose d is distance and Va, Vb and Vc are their respective velocities. now when A finishes, time taken is d/Va. Also
d/Va = d/Vc - 16/Vc
d/Va = d/Vb - 8/Vb

this implies Vb/Vc = (d-8)/(d-16)
also, if you assume time taken by B to cover the remaining distance is t then
Vb = 8/t
and Vc = 6/t
this gives Vb/Bc = 8/6

now solve the two equations and u will get the value of d.

- Anonymous August 12, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

thank you very much for the detailed explanation @ anonymous

- donkeyMan August 13, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@Anon
would you like explaining your approach in detail for others sake?

- donkeyMan August 12, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i get 30 mts.
va vb vc be the velocites.
from the change in position betw two given instances
vb = 8/t
vc = 6/t
vb/vc = 4/3
take the velocities as 4v and 3v
take the track distance as D
since both have travelled for the same time. equating their time,
D/3v = (D-10)/4v
which gives D as 30 .
Tell me if the ans is write and also if there is a better approach

- BALKI September 10, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

vb=4v & vc=3v
so d/4v=(d-10)/3v
which gives 40

- anon December 06, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Please check the logic:

Speed of A = Sa, Speed of B = Sb, Speed of C = Sc
Let D be the track length, T is time taken by A to travel the track
D/T = Sa, D/(T+8) = Sb, D/(T+16) = Sc.

In 8 minutes, the diff between A and B is 10 minutes.
In 1 minute, the diff is 8/10 =4/5 mins, so Sb=5/4*Sc, Sa=5/2*Sc
Substituting from above
D/(T+8) = 5/4*(D/T+16) => T=24.

Since all speeds can be represented in Sc=D/(24+16), the smallest integer value that makes Sc=1, makes D=40.
The distance is 40 distance units.

- S.M September 23, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

S.M - Dude take a vacation. You need one!

No need to complicate things when it can be explained as simply as what "interviewtomorrow" added.

- VM September 23, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Dude!! If SM is explaining the problem in a better way, how can you actually pass such a derogatory statement. I guess you need to get some serious bashing and ass spanking. You SOB!

- @loler September 24, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Suppose X is the length of the track.
When A covered X m, B covered X-8 m and C X-16 m.
When B covered X m, C covered X-10 m.
So When B covered 8 m,

- Raja Guru T September 25, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Suppose X is the length of the track.
When A covered X m, B covered X-8 m and C X-16 m.
When B covered X m, C covered X-10 m.
So When B covered 8 m, C covered 6 m ( X-10 - X +16)
i.e x-8/x-16 = 8/6
x=40 m

- Raja Guru T September 25, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

kinda doubt does google really define a preliminary-school level prob as brainteaser?

- Anonymous September 26, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

what about it's a multi-lap run?

- Anonymous February 19, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Answer is 40 meter,

Let total distance is D and Total time taken by A is T

S(a) = D/ T , S(b) = D-8 / T , S(c) = D-16 / T;

Now lets assume times taken by B to cover 8ms to finish line was t

S(b) = 8 / t ; S(c) = 6 / t ( Since C only covered 6 meters in that duration);

On Solving this we get S(c) = 3/4 S(b);

Replace the value of S(b) & S(c) inside equation 1

D-8 / T = 4/3 (( D - 16 ) / T );

On Solving we get D = 40

- Maverick March 17, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

L = Va*T
L-8 = Vb*T
L=16 = Vc*T
==============
L= Vb*T1
L-10 = Vc*T1
L/(L-10) = Vb/Vc= (L-8)/(L-16)
2L = 80
L = 40 Meter.

- Tarun Kumar April 18, 2011 | Flag Reply


Add a Comment
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.

Learn More

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.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More