Fastest Horses-Puzzle for Interview rounds

Question:

There are 5 lanes on a race track and there are 25 horses. You need to determine the 3 fastest horses by conducting races. Find out the minimum number of races that need to be conducted in order to do that.

Solution: 7 Races

The approach entails conducting 5 races where each race group would involve 5 horses. In the ensuing step, a sixth race is conducted between winners of the first 5 races to determine the 3 fastest horses (marked A1, B1, A=and C1). The seventh race is conducted between horses B1, C1, second and third horse from the horse A1’s group (A2, A3), the second horse from horse B1’s group (B2). The horses that finish 1st and 2nd in the seventh race, are actually the 2nd and the 3rd fastest horses among all horses.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--

--

Upskilling students for tech placements!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Questions Resilient Leaders Ask Themselves at the End of Every Day — Part I

Meet Confio series #6

Women Of The C-Suite: “We are all equal in service to the customer”, With Nancy Ham, CEO of WebPT

It’s a million small things that matter

Why Product Support is like a bra.

10 Things You Wish You Knew Before Becoming A CTO

Why Athletes Should Become Entrepreneurs When They Retire

1. How to Win Friends and Influence People — Dale Carnegie

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Placewit

Placewit

Upskilling students for tech placements!

More from Medium

Longest Increasing Subsequence Coding Question

Meta / Amazon / Google / Microsoft| Product of Array Except Self | LeetCode-238: Medium |…

Leetcode Q152. Maximum Product Subarray

Leetcode 820. Short Encoding of Words