An Interest In:
Web News this Week
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
- March 24, 2024
December 27, 2019 09:25 am GMT
Original Link: https://dev.to/comscience/can-you-solve-the-fastest-horse-algorithm-problem-47b8
Can you solve the fastest horse algorithm problem?
In this week's article, we dig into something different.
Let us look at an algorithm problem wherein there are multiple approaches but just one optimum solution.
Problem Statement
----------------------
------------
--------------------------
-----------------
--
There are 25 horses with you. The problem statement is to find the top 3 fastest horses among them. But there is a constraint. You have only 5 parallel race tracks and hence, you can only race 5 horses at a time.
How would you group the horses and race them so that you find out the top 3 fastest horses in the minumum number of races?
Give it a shot. After you think you have the answer, check out this video to see if you were correct:
Cheers!
Original Link: https://dev.to/comscience/can-you-solve-the-fastest-horse-algorithm-problem-47b8
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To