← Armada Interview Insights

Armada·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Armada software engineer interview threw a classic puzzle at me, the 25 horses problem. Pretty standard for a technical screen but I second-guessed myself more than I expected to.

Questions Asked (1)

Q1

You have 25 horses and a track that fits 5 at a time. No timer, just finishing order per race. What's the minimum number of races to find the single fastest horse? Bonus: what about the top 3?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

I knew this one but still fumbled the explanation a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem constraints and then walk through a systematic elimination strategy. For the fastest horse, use 5 initial races to find the best of each group, then race those winners to identify the overall fastest. For the top 3, extend the logic by considering only horses that could possibly be in the top 3 based on race results, and use additional races to determine the final ranking.

Pro tip: Explicitly state your assumptions (e.g., no ties, consistent performance) and then explain how you would handle ties if they occur. This shows attention to detail and robustness, which is highly valued in engineering roles.

1. Clarify the problem

Confirm that there are 25 horses, each race can have up to 5 horses, and we need the minimum number of races to find the fastest (and top 3). Assume no ties and that horse performance is consistent.

2. Find the fastest horse

Divide the 25 horses into 5 groups of 5. Race each group (5 races). Then race the 5 winners (1 race). The winner of this race is the fastest overall. Total: 6 races.

3. Identify candidates for top 3

After the 6 races, label groups A-E by the rank of their winner in the winners' race. The fastest horse is A1. Potential top 3 horses are limited: A2, A3, B1, B2, C1. All others are eliminated.

4. Determine top 3 with one more race

Race the 5 candidate horses: A2, A3, B1, B2, C1. The top two from this race, along with A1, are the top 3 overall. Total races: 7.

5. Verify and discuss trade-offs

Confirm that 7 is minimal by arguing that at least 5 races are needed to see all horses, and additional races are required to compare winners and resolve the top 3. Mention that if only the fastest is needed, 6 races suffice.

Key Points to Mention

  • The need to race all horses at least once, requiring 5 initial races.
  • The winners' race to determine the fastest among group winners.
  • The elimination logic: only certain horses can be in the top 3 based on their group and the winners' race.
  • The final race among candidates A2, A3, B1, B2, C1 to determine the 2nd and 3rd fastest.
  • The total minimum races: 6 for fastest, 7 for top 3.
  • Assumptions such as no ties and consistent performance, and how ties would affect the answer.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.