effective-java-3e-source-code icon indicating copy to clipboard operation
effective-java-3e-source-code copied to clipboard

Anagrams exercise

Open apobits opened this issue 3 years ago • 0 comments

On lambdas and streams chapter there is this exercise: image The problem here is that variable words refer to a stream of lines so the program is processing lines not words. I present a solution using flatMap on words where the line is splitted with a regex(I assumed the words are separated in the file with space, comma, tab, point, dash). image

apobits avatar Jul 19 '21 14:07 apobits