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

Java, 58 bytes

l->l.stream().map(x->java.util.Collections.frequency(l,x))
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!

Java, 58 bytes

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

Try it online!

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!

Source Link
Unmitigated
  • 2.8k
  • 1
  • 5
  • 14

Java, 58 bytes

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

Try it online!