Adobe Interview Question for Software Engineer / Developers


Team: Lifecycle
Country: India




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

A1,A2,A3,A4,A5
B1,B2,B3,B4,B5
C1,C2,C3,C4,C5
D1,D2,D3,D4,D5
E1,E2,E3,E4,E5

Above 5 races

A1,B1,C1,D1,E1
1 Race

Now top 3 in the list as per my assumption or take any other also

D1, C1, E1

Qualified for next round

D1, C1, E1,
D2 C2
D3

D1 is the first best here

pick best two in the next race among D2,D3, C1,C2, E1

total races = 5+1+1 = 7

- Anonymous July 05, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Neat. Only 7 races will be required.

- Spock July 10, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

7 Races

1.  Make 5 batches of 5 each. Eliminating 10 members (2 from each group). Top 3 of every group remains.
2. Take 1 top from each of 5 batches and whosoever is winner, gives us fastest.
3. Take 2nd topper from batch from which fastest was found and run against 4 remaining from step 2. After this race top two will form 2nd and 3rd fastest.

- akc July 09, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You are wrong..For the 7th race, 4th and 5th fastest of the 6th race has to be eliminated...

- cobra July 09, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 4 vote

8 races. 6 races to find the first place and after that for next i.e. Second we need one more and so on

First take 5 sets of 5 horses. Notice the position of each group horces. Now take top five horses say A1,B1,C1,D1,E1... now with one race we can know the top horse lets say its B1, Now choose B2 and have a race between A1,B2,C1,D1,E1..... now we need another race to know the second position. Similarily we can find the third one in 1 more race Sp total races are 6(to determine 1st place) + 1(to determine 2nd) + 1(to determine (3rd), So total of 8 races

- loveCoding July 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You are right manan.
If the timer is available then there is minimum 5 races are required.
But if the timer is not available then the minimum races required will be 8 as Manan explained.

- Ashish August 09, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

7 races

- amanj27 July 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

if aman's assumption is true then 11 races...as we need to get best 3 after each race...

- atul gupta July 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

classic-puzzles.blogspot.in/2011/11/25-horses-puzzle.html

- alexander July 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

first make groups of 5. Race them all. (5 races). Reject the bottom 2 of all groups.
Race all their winners. Eliminate the 1st (he is fastest) and the 4th horse and 5th (along with their groups). (6 races and 8 horses left ).
Now take the remaining two of the horses from which the fastest was found the top two of the second set and the top of the 3rd set.(this is 7h race and is the final answer.)

- Anonymous July 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Classic Problem, 7 races required. Google the problem

- nerd July 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

6 races.

A1,A2,A3,A4,A5
B1,B2,B3,B4,B5
C1,C2,C3,C4,C5
D1,D2,D3,D4,D5
E1,E2,E3,E4,E5

Above 5 races

A1,B1,C1,D1,E1
1 Race

Top 3 here are the best three

- dex August 20, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

11 races.Run first group, than eliminate last 2 than add another 2, keep doing it until 3 horses are left.This will be our answer.

- pranav.coolpj July 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 3 vote

12 races:
Race 1 : 1 2 3 4 5
Race 2 : 6 7 8 9 10
Race 3: 11 12 13 14 15
Race 4: 16 17 18 19 20
Race 5: 21 22 23 24 25

Take top 3 of each set --- you will get 15 shortlisted horses
This will lead to another 3 races... (Now 8 races)

From 15 horses, Again take top 3 of each of 3 set -- you will get 9 shortlisted horses
this will lead to another 2 races.. (Now 10 races)

From 9 horses of 2 races .. take top 3 of each of 2 set .. you will get 6 horses..

From the 6 horses... one race is done with 4 horses(11th race) .. from the top 3 of the 11th race , 12 th race is done with remaining 2 horses... and top 3 will be found..

- cobra July 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

1. 5 Group of 5 horses, We eliminate 2*5 = 10 horses, 15 left
2. 3 Group of 5 horses, We eliminate 2*3 = 6 horses , 9 left
3. Race one group of 5 horses, 3 left, and total 4+3 == 7 left
4. Race one group of 5 horses to eliminate 2 horses and we are left with 5 horses
5. One more race and all 3 top mighty horses are known to you
So total minimum race required 5+ 3 + 1+ 1 + 1 = 11
Cheers

- pc July 06, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 4 vote

7 Races. Do by elimination after 6 races

- Luv July 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

If all horses are in one set how will ylu find all 3

- ben July 03, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

This is completely wrong

- loveCoding July 03, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@Manan Your solution is wrong, it will come out 7.

- Luv July 03, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

This is a standard puzzle, check on google

- alexander July 03, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

This is obviously incorrect. Suppose the five groups are A, B, C, D, E. After racing each of these groups you can find out the top horse in each group. So you know the horse ranked 1 in each group (A1, B1, C1, D1, E1) and you can race these to find out the fastest horse. But it is possible that the horse that came second in Group A (A2) is faster than the horse that came first in Group B (B1). Your method doesn't take that into account.
Or as ben pointed out, if the top 3 horses out of the 25 are in the same group, then your method won't work.

- Bonzo July 03, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

It takes into account all those things This is absolutely correct, check on google

- alexander July 04, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@Bonzo : If A1 is ranked first in the 6th race , then in 7th race , we'll include the second fastest horse of group A . So , the 7th race will include A2, B1, C1, D1, E1 .

But I think the ans should be 8 .

- Shobhit July 04, 2012 | Flag
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

The essence of the problem i think here is that, after a race you can't store the timings. you just know the positions.

- aman July 03, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

If the best three horses are in a single set , how will u identify them?

- cobra July 03, 2012 | Flag
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

A1,A2,A3,A4,A5
B1,B2,B3,B4,B5
C1,C2,C3,C4,C5
D1,D2,D3,D4,D5
E1,E2,E3,E4,E5

Above 5 races

A1,B1,C1,D1,E1
1 Race

Now top 3 in the list as per my assumption or take any other also

D1, C1, E1

Qualified for next round

D1, C1, E1,
D2 C2
D3

D1 is the first best here

pick best two in the next race among D2,D3, C1,C2, E1

total races = 5+1+1 = 7

- bhaskara July 05, 2012 | Flag


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