Determine whether any club has won more than all others based on the list of match results.
Problem
You are given the results of a football tournament. Each match result is a team name, and the winner of a match earns one point. Your task is to find the team with the highest total score and decide whether that team is the unique leader.
Return the name of the team with the largest number of wins if it is strictly greater than every other team’s score. If there is a tie for first place, the specific behavior depends on the exact problem statement from the contest, but the core task is to identify the top-scoring team from the list of results.
This is a simple counting problem: scan the results, count how many times each team appears, and compare totals.
Input Format
- The input consists of a list of match result records.
- Each record contains a team name or winner name.
- The exact contest formatting may vary, but the solution only needs to count occurrences of names.
Output Format
- Output the team name that satisfies the tournament scoring rule.
- If the data format requires another answer in case of a tie, handle it according to the statement rules.
Constraints
- The number of results is small to moderate.
- Team names are non-empty strings.
- A linear scan with counting is sufficient.
Example 1
Input
3 A B A
Output
A
Explanation
Team A appears twice, while team B appears once, so A has the highest count.
Premium problem context
Unlock deeper context for this problem
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.