HackerRank Solutions Grading Students Problem [SOLVED]
It is as simple as HELL!!
https://www.hackerrank.com/challenges/grading/problem
SO EASY!!
public static List<int> gradingStudents(List<int> grades)
{
for (int i = 0; i < grades.Count; i++)
{
var item = grades[i];
if (item >= 38)
{
var diff = 5 - (item % 5);
if (diff < 3)
grades[i] = item + diff;
}
}
return grades;
}
Read more...