Update
This commit is contained in:
@@ -11,7 +11,6 @@ public class WordGroupImpl implements WordGroup {
|
||||
public Map<Integer, List<String>> groupWordsByLength(String text) {
|
||||
text = text.replaceAll("[.,]", "");
|
||||
return Arrays.stream(text.split(" "))
|
||||
.map(String::toLowerCase)
|
||||
.collect(Collectors.groupingBy(String::length));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user