Internshala interview question

Puzzle : The 25 horse problem.