I am having problem with this question:
Given a list of test results (each with a test date, Student ID, and the student’s Score); return the Final Score for each student. A student’s Final Score is calculated as the average of his/her 5 highest test scores. You can assume each student has at least 5 test scores.
Now, here is the thing. I do not want the answer.
I tried the hashing, but hashing can provide key with addresses so it did not work for me.
I thought of using array list the iterate thought to calculate the average and return the top five score, but how do I assign the numbers with the studentID ?
Say I want the output to be: Mike, 15. Is not this what the question requires ?
To get the student ID and the average number.
Please, help me out with some clues, I am learning.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…