You are viewing a single comment's thread. Return to all comments →
public static List breakingRecords(List scores) { int highCount = 0,lowCount = 0,highestScore = scores[0],lowestScore = scores[0]; if (scores.Count == 0) return new List { 0, 0 }; foreach(int item in scores){ if(item > highestScore){ highCount ++; highestScore = item; } else if(item
} return new List<int>{highCount,lowCount}; }
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
public static List breakingRecords(List scores) {
int highCount = 0,lowCount = 0,highestScore = scores[0],lowestScore = scores[0]; if (scores.Count == 0) return new List { 0, 0 }; foreach(int item in scores){ if(item > highestScore){ highCount ++; highestScore = item; } else if(item