• + 6 comments

    Here is my java solution

    public static List<Integer> gradingStudents(List<Integer> grades) {
        
        for(int k=0; k<grades.size();k++){
            if(grades.get(k)>37){          
                for(int i=0;i<3;i++){
                    if((grades.get(k)+i)%5==0){
                        grades.set(k,grades.get(k)+i );                 
                    }         
            }      
        }
    
        }
        return grades;