You are viewing a single comment's thread. Return to all comments →
C#
public static int sockMerchant(int n, List<int> ar) { var orderArray = ar.Order().ToList(); var sets = orderArray.GroupBy(n => n).ToList(); int countPairs = 0; sets.ForEach(s => countPairs += s.ToList().Count() / 2); return countPairs; }
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 →
C#