79276640

Date: 2024-12-12 21:27:41
Score: 2
Natty:
Report link

This looks simpler to me.

Map<String, Long> charCount = words.stream().map(s -> s.split("")).flatMap(Arrays::stream) .collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));

{a=2, c=1, d=1, e=3, h=1, j=1, l=2, m=1, o=3, r=1, t=2, v=1, w=1, W=1}

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: vplust