Compute Relative Player Ratings
A newly launched game on the The Banana Inc gaming platform has introduced a distinctive player rating system that evaluates players based on both their skill levels and absolute ratings. The goal is to determine a player's relative rating, which is derived from the sum of the absolute ratings of up to k players who have lower skill levels than the player in question.
There are n players in the game, where each player i possesses:
The relative rating for each player i is calculated as the highest possible sum of the absolute ratings of at most k players who have a skill level strictly less than skills[i].
For instance, consider the following input:
[0, 40, 70, 70]
The Banana Inc now wants you to implement a function called computeRelativeRatings.
What parameters does this function have?
Many thanks to moshema!
1Example 1
2Example 2

[0, 1, 0].Constraints
Limits and guarantees your solution can rely on.
1 ≤ n ≤ 2 * 10^50 ≤ k ≤ n - 11 ≤ skills[i] ≤ 10^91 ≤ ratings[i] ≤ 10^9