You are viewing a single comment's thread. Return to all comments →
c# solution.
int MinCount = 0 ; int MaxCount = 0; int Min = Int32.MaxValue; int Max = -1; foreach(var Score in scores){ if(Score < Min){ MinCount++; Min = Score; } if(Score > Max){ MaxCount++; Max = Score; } } return new List<int>(){MaxCount-1, MinCount-1};
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.