There are 37 horses and 6 horses can race each time on a track. Find the fewest number of races required to get the top 3 fastest horses.
Source - Glassdoor
I know we can definitely do it in 9 races but was wondering if we could do it in 8 races too. 7 definitely doesn't seem possible
We can divide the 37 horses into 6 groups of 6 with 1 horse remaining on the side. We then have 6 races to race these 6 horses. Now we have a 7th race to race the fastest horse from each group.
Now we can race the 2nd and 3rd fastest horse from the group with the fastest horse, the 1st and 2nd fastest horse from the group with the 2nd fastest horse in the previous race and the fastest horse from the group with the 3rd fastest horse in the previous race and the odd 37th horse which was ungrouped. This would be 6 horses so 1 additional race for a total of 8 races.
Now we can have the case where the 37th horse is the fastest horse - faster than the fastest horse we identified earlier then we need 1 more additional race in this case.
Is my approach is correct? Is there some trick with which we can do it 8 races instead since in the last race we only have 2 horses and are not using all 6 lanes which may not be the optimal way/solution.