Interview Question for Software Engineer / Developers






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

0.1666
The first question is how many times will they try to meet / go to the common point?
second, what is the travel time?
Anyways here's a hypothesis, assume travel time = 0 and number of times they travel = 1
Consider a different perspective of the problem,
given two bulbs A and B, in a 1 hr window how many times are both bulbs on? Given if a bulb goes on then it stays on for 10 minutes.
If A goes ON at t=1, both are ON if B goes ON anytime between t=1:10 and since we assumed bulb goes ON only once, for all t=11:60 it the condition fails.
So probability = 10/60 = 0.166
Any ideas? maybe conditional probability is used??

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

Idea is simple (remember probabilities theory).
All area where they can meet is 1hx1h.
They can meet on condition |Ta-Tb|<=10.
This gives us 2 equations: Tb=Ta-10 and Tb=Ta+10.
Now draw it on the plot Tb vs. Ta (will get 2 lines) and limit with 1hx1h area. Area between those two lines divided by all 1hx1h area is probability.
Result: 1-2*(5/6*5/6/2)=11/36.

- Sergey October 20, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

nice

- Anonymous October 29, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Good Answer

- Ramsri December 24, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Great answer..!!

- Anonymous March 14, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I disagree, each one can meet the other for ten minutes in this hour. so that gives a probability of 10/60 for A and 10/60 for B. What we want is that the two events take place at the same time. That is P(A)xP(B). 1/6x1/6 = 1/36

- t.g May 30, 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