25 horses 5 tracks 5 fastest horses puzzle

Q: 25 horses, 5 race tracks. How many races you have to run to select top 5 horses.

Solution:
Step 1: First, we group the horses into groups of 5 and race each group in the race course. This gives us 5 races.W11   W12   W13   W14   W15W21   W22   W23   W24   W25W31   W32   W33   W34   W35W41   W42   W43   W44   W45W51   W52   W53   W54   W55Step 2:we race the 5 level 1 winners(w11,w21,w31,w41,w51) and assume winning order of this race is w11,w21,w31,w41,w51 (THIS IS 6TH RACE)
Step 3: BECAUSE WE NEED TOP 5 AND W51 HAS COME 5TH Position that is the reason we don’t need to consider W52   W53   W54   W55
now we have
W11   W12   W13   W14   W15W21   W22   W23   W24   W25W31   W32   W33   W34   W35W41   W42   W43   W44   W45W51

Step 4: because we need top 5 then dont need    W25   W34   W35   W43   W44   W45

now we have

W11   W12   W13   W14   W15W21   W22   W23   W24   W31   W32   W33  W41   W42   W51
Step 5:  top 1 is already achieved which is W11(winner of 6th race)
remaining are
X        W12   W13   W14   W15W21   W22   W23   W24   W31   W32   W33  W41   W42   W51
Step 6: candidates for 5th position:  W51 W42 W33 W24 W15. 1 RACE TO GET 5TH POSITION (this is 7th race)
 
remaining are
 
X     W12   W13   W14   W21   W22   W23   W31   W32 W41
 
Step 7:  candidates for 4th position: W41 W32 W23 W14. 1 race to get 4th position ((this is 8th race)
X     W12   W13   W21   W22   W31
Step 8: candidates for the 2nd and 3rd position:  W12   W13   W21   W22   W31. 1 race to get the 2nd and 3rd  position ((this is 9th race)
 
 
Hence answer is 9 races.