Minimum races to decide top 3 horses out of 25
Filed under SAP
Free read 2 of 3Divide the 25 horses into 5 distinct groups of 5 and race each group. This takes 5 races.
The question
You have 25 horses and a racetrack that can accommodate at most 5 horses at a time. Each horse runs at a constant speed, and there are no stopwatches. Find the minimum number of races needed to determine the top 3 fastest horses.
Constraints
- Total horses = 25
- Track capacity = 5 horses per race
- No timing devices allowed
Examples
- Input
- 25 horses, 5 tracks
- Output
- 7 races
- Why
- Group horses into 5 groups of 5 and race each group (5 races). Race the 5 group winners (1 race). Finally, race the top contenders strategically to find the 2nd and 3rd place overall (1 race).
Approach
Divide the 25 horses into 5 distinct groups of 5 and race each group. This takes 5 races.
Race the winners of each of the 5 groups against each other. This takes 1 race and identifies the absolute fastest horse (#1).
Use logical deduction to eliminate horses that cannot possibly be in the top 3. Run a 7th and final race with the remaining candidates to determine the 2nd and 3rd place horses.
Tips
- What they are testing: Tests logical deduction, strategic elimination, and puzzle-solving skills under constraints.
- Common mistake: Assuming you need to race every possible combination of remaining top horses instead of logically eliminating non-contenders.
Related SAP questions
Collected from public candidate posts and coding forums. Updated Nov 2026.