Given a list of the scores of different students,
items, whereitems[i] = [IDi, scorei]represents one score from a student withIDi, calculate each student’s top five average.Return the answer as an array of pairs
result, whereresult[j] = [IDj, topFiveAveragej]represents the student withIDjand their top five average. SortresultbyIDjin increasing order.A student’s top five average is calculated by taking the sum of their top five scores and dividing it by
5using integer division.
1 | class Solution { |