## 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

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

Neat. Only 7 races will be required.

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.``````

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

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

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

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

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.

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

7 races

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...

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

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

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.)

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

Classic Problem, 7 races required. Google the problem

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

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.

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..

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

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

7 Races. Do by elimination after 6 races

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

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

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

This is completely wrong

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

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

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

This is a standard puzzle, check on google

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

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.

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

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

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

@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 .

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

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

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

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

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

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

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.