We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8219429 commit 98def03Copy full SHA for 98def03
Easy/Maximum Number of Words Found in Sentences.java
@@ -0,0 +1,6 @@
1
+class Solution {
2
+ public int mostWordsFound(String[] sentences) {
3
+ return Arrays.stream(sentences).map(sentence -> sentence.split("\\s").length)
4
+ .max(Integer::compare).orElse(0);
5
+ }
6
+}
0 commit comments