โ† SAP questions
CodingReported in a candidate post, Sep 2016

Minimum races to decide top 3 horses out of 25

Filed under SAP

Free read 2 of 3

Divide 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

  1. Divide the 25 horses into 5 distinct groups of 5 and race each group. This takes 5 races.

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.