Company: amazon_14feb
Difficulty: medium
Code Question 2 Problem Description One of the tournaments launched on Amazon esports has come up with a unique scoring system for the competitors. It is based on their individual ability levels and performance scores. There are m competitors where the j th competitor has an ability level of ability[j] and a performance score of score[j] . The comparative score of a competitor j is defined as the number of competitions k (where k != j ) such that ability[k] is strictly less than ability[j] and score[k] is strictly less than score[j] . Additionally, there is a limit on the number of competitions that can be chosen. A competitor j can choose at most limit competitions k (where k != j ) such that ability[k] is strictly less than ability[j] and score[k] is strictly less than score[j] . Given ability , score , and limit , find each competitor's comparative score. Function Description Complete the function calculatePlayerScores in the editor below. calculatePlayerScores takes the following a