You are viewing a single comment's thread. Return to all comments →
C# solution
public static List<int> breakingRecords(List<int> scores) { var min = scores[0]; var max = scores[0]; var breakMin = 0; var breakMax = 0; foreach(var score in scores) { if (score < min) { breakMin += 1; min = score; } if (score > max) { breakMax += 1; max = score; } } return new List<int> { breakMax, breakMin }; }
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →
C# solution