Problem 44510. Besson Ranks
Return Besson Ranks. You can look at this article.
Besson ranking takes into account ties.
If input is
input = [1 2 2 3];
then in a regular ranking we should return
regularRanks = [1 2 3 4];
However a tie occurs at 2 and 3 in the regular ranking. So you should average their position which is (2 + 3 )/ 2 = 2.5
Finally;
bessonRankings= [1 2.5 2.5 4]
Solution Stats
Problem Comments
-
2 Comments
I might be mistaken, but I think the 17th test case doesn't do anything.
Yes, it doesn't check for anything. But I'll let it be, as it is not causing any problem.
Solution Comments
Show commentsProblem Recent Solvers15
Suggested Problems
-
Select every other element of a vector
35882 Solvers
-
Project Euler: Problem 10, Sum of Primes
2077 Solvers
-
Back to basics 11 - Max Integer
806 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
395 Solvers
-
Return the names and values of the input arguments of a function
30 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!