I have a structure. that consist of the following:Athlete A         Athlete  B     Athlete Cspeed=10          speed=12       speed=6endurance=60      endurance=59   endurance=64I would like to rank the strength of those three Athletes based on their speed and endurance. I would like to give a slightly greater weight (0.6) to the endurance. Is there any algorithm that have a good complexity to solve this problem?
Rank athletes by weighted criteria
algorithms;sorting
I would like to rank the strength of those three Athletes based on their speed and endurance. There is an infinite number of ways of doing that. The two lexicographic orders and weighted sums are only a few examples.What do you really want?I would like to give a slightly greater weight (0.6) to the endurance.This suggests that you want (linear) weighted sums. If that is to make sense, you need to normalize your values to a shared scale. You don't give units or ranges, so I'll have to guess.Normalizing with the maximum values in the sample and assuming that values $0$ are possible, a weighted sum that gives weight $p \in [0,1]$ to endurance and $1-p$ to speed looks like this:$\qquad\displaystyle w(a) = p \cdot \frac{\operatorname{end}(a)}{64} + (1-p) \cdot \frac{\operatorname{speed}(a)}{12}$.Implementing this is so straight-forward that it's barely worth being called algorithm; you'll certainly find nothing in a textbook that lays out the details for your. Just code it down.