Suppose we have 100 runners. And they run 100 races. All we are given is the order that the racers come in, 1 through 100.
At the end of the race series what would be the fairest way to determine the top five winners?
What algorithm or math procedure would one use to arrive at the solution?
We have 100 lists, of results. All lists numbered 1 to 100. A different ordering of names on each list, depending on the place they finish each race.
Answers and insights greatly appreciated.
An easy way would be to calculate the average rank of each runner, order them and take the top 5.
Hint:
As for the algorithm, since you have lists of names for each race, you might want to turn this into a list of ranks for each runner and then do all sorts of calculations depending on the way you want to compute overall ranks.
So for each list you just iterate over the list, incrementing an index at each iteration (which represents the rank of the runner), and each time, you take the current index and add it to the list corresponding to the name of the runner at this index.
It's a math forum so I won't go into any further details about the algorithm but I guess you got the main idea ;)