Search⌘ K
AI Features

Solution: High Five

Understand how to use hash maps to group student scores and compute the top five average scores for each student efficiently. This lesson guides you through storing scores, sorting to find top values, and performing integer division to get averages, providing a solid approach to solve similar interview problems.

Statement

You are given a list of scores for multiple students, represented as items, where items[i]=[IDi,scorei]items[i] = [ID_i, score_i] ...