Grading Students Solution Click below button to read problem. Problem statement : Grading Student Solution public static List<...

Grading Students Solution

 Grading Students Solution


Click below button to read problem.



Solution


public static List<Integer> gradingStudents(List<Integer> grades) {
    // Write your code here
    List<Integer> l = new ArrayList<Integer>();
        for(Integer x: grades) {
            
            if(x<38) 
                l.add(x);
            else if(((x/5)*5+5)-x<3) 
                l.add((x/5)*5+5);
            else 
                l.add(x); 
    }
    return l;
    }
}

0 comments:

Do not spam here.