2. Problem
• There are 25 horses among which you need to
find out the fastest 3 horses.
• You can conduct race among at most 5 to find
out their relative speed.
• At no point you can find out the actual speed
of the horse in a race.
• Find out how many races are required to get
the top 3 horses.
3. Solution
• Divide the 25 horses into 5 groups each group
have 5 horses, then make a race for each group
and choose the first three winner horses from
each group.
• Now we have 15 winner horses , we will sort
these horses according to their speed
computation.
• Choose the first three horses
• Result:- we will have five races among the horses
only with a sorted algorithm.
4. 25 horse
RC1 RC2 RC3 RC4 RC5
Sort the 15 winner horses, then
choose the faster three horses