You are viewing a single comment's thread. Return to all comments →
in c#
int pairs = 0; var colors = ar.Distinct(); foreach(var a in colors){ var pair = ar.Where(x => x == a).ToList(); if(pair.Count() % 2 != 0) pair.Remove(a); pairs += pair.Count()/2; } return pairs;
Seems like cookies are disabled on this browser, please enable them to open this website
Sales by Match
You are viewing a single comment's thread. Return to all comments →
in c#