3 added 132 characters in body
source | link

C# (Visual C# Interactive Compiler), 40 bytes

n=>n.GroupBy(c=>c).Count(c=>c.Count()<2>1)

The first draft of the spec was unclear, and I thought it mean return all the elements that appear more than once. This is the updated version.

Try it online! Somehow I didn't notice that my code returned the number of elements that appeared once. Thanks to Paul Karam for catching that!

Try it online!

C# (Visual C# Interactive Compiler), 40 bytes

n=>n.GroupBy(c=>c).Count(c=>c.Count()<2)

The first draft of the spec was unclear, and I thought it mean return all the elements that appear more than once. This is the updated version.

Try it online!

C# (Visual C# Interactive Compiler), 40 bytes

n=>n.GroupBy(c=>c).Count(c=>c.Count()>1)

The first draft of the spec was unclear, and I thought it mean return all the elements that appear more than once. This is the updated version.

Somehow I didn't notice that my code returned the number of elements that appeared once. Thanks to Paul Karam for catching that!

Try it online!

2 deleted 3 characters in body
source | link

C# (Visual C# Interactive Compiler), 40 bytes

n=>n.GroupBy(c=>c).WhereCount(x=>xc=>c.Count()>1<2)

Outputs by an IEnumerable<IGrouping<int,int>> withThe first draft of the relevantspec was unclear, and I thought it mean return all the elements stored inthat appear more than once. This is the keyupdated version.

Try it online!Try it online!

C# (Visual C# Interactive Compiler), 40 bytes

n=>n.GroupBy(c=>c).Where(x=>x.Count()>1)

Outputs by an IEnumerable<IGrouping<int,int>> with the relevant elements stored in the key.

Try it online!

C# (Visual C# Interactive Compiler), 40 bytes

n=>n.GroupBy(c=>c).Count(c=>c.Count()<2)

The first draft of the spec was unclear, and I thought it mean return all the elements that appear more than once. This is the updated version.

Try it online!

1
source | link

C# (Visual C# Interactive Compiler), 40 bytes

n=>n.GroupBy(c=>c).Where(x=>x.Count()>1)

Outputs by an IEnumerable<IGrouping<int,int>> with the relevant elements stored in the key.

Try it online!