Q: how to use priorityqueue to store five biggest number in a map? There's a question like this:
Input is List Where result is:
result {
int id;
int score;
}

Output should be a map.
The question is there are a list of students where each of student has at least five scores. We want to output a map where key is the student if and value is the average of studrtns's highest five scores
i figured that I should do priorityqueue overriding the compare function but how specifically do I implement this question in full? 
PriorityQueue<Integer> pq = PriorityQueue<Integer>(new Comparator<Integer>(){
        @Override
        public int compare(int a, int b) {
            return a-b;
            }
        });

