Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 27, 2019 09:25 am GMT

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:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To