Skip to main content
2 of 2
added 556 characters in body
Unmitigated
  • 2.8k
  • 1
  • 5
  • 14

Java, 58 bytes

l->l.stream().map(x->java.util.Collections.frequency(l,x))

Try it online!

Java, 56 bytes

l->l.stream().map(x->l.stream().filter(y->y==x).count())

This only works for integers in the Integer Cache (-128 to 127, by default).

Try it online!

Unmitigated
  • 2.8k
  • 1
  • 5
  • 14