I wrote two queries to find duplicates in the array
var groups = from item in array
group item by item;
var q1 = from grp in groups
where grp.Count() > 1
select grp.Key;
Is there a way to write this in one LINQ query? I know I can use method calls
array.GroupBy(i => i).Where(g => g.Count() > 0).Select(g => g.Key)
, but I'm curious if it is possible to use LINQ syntax