RosettaCodeData/Task/Ranking-methods/00DESCRIPTION

28 lines
1.1 KiB
Plaintext

The numerical rank of competitors in a competition shows if one is better than, equal to, or worse than another based on their results in a competition.
The numerical rank of a competitor can be assigned in several [[wp:Ranking|different ways]].
;Task:
The following scores are accrued for all competitors of a competition (in best-first order):
<pre>44 Solomon
42 Jason
42 Errol
41 Garry
41 Bernard
41 Barry
39 Stephen</pre>
For each of the following ranking methods, create a function/method/procedure/subroutine... that applies the ranking method to an ordered list of scores with scorers:
# Standard. (Ties share what would have been their first ordinal number).
# Modified. (Ties share what would have been their last ordinal number).
# Dense. (Ties share the next available integer).
# Ordinal. ((Competitors take the next available integer. Ties are not treated otherwise).
# Fractional. (Ties share the mean of what would have been their ordinal numbers).
<br>
See the [[wp:Ranking|wikipedia article]] for a fuller description.
Show here, on this page, the ranking of the test scores under each of the numbered ranking methods.
<br><br>