Google Interview Question for Software Engineer / Developers
- -9of 9 votes
An arraylist containing datatype studentsScores are given where studentId, and results are twostates of this datatype. Each student takes more than 10 exams. We need to return the averages score of each student as a Map<student, average score> where the average score is calculated by taking the average of top 5 exams of a student.- sivaji8 October 08, 2013 in United States
First we iterate the arraylist and create another Map<Integer, ArrayList<>> where the inner ArrayList has values of test scores. Iterating the arrayList to find avergae score and adding it to the another Map<student, averageScore>. What is the complexity of this?
| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer
Open Chat in New Window