Sales by Match

  • + 0 comments

    C#

            var cc = ar.GroupBy(x => x)
                           .Select(g => new { Count = g.Count(), Number = g.Key })
                           .ToList();
    
            var pairs = cc.Where(x => x.Count >= 2).Sum(x => x.Count / 2);
            return pairs;