Skip to content

Commit 1805ec3

Browse files
committed
Time: 1 ms (95.16%), Space: 51.5 MB (42.49%) - LeetHub
1 parent d169f22 commit 1805ec3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2219-maximum-number-of-words-found-in-sentences/2219-maximum-number-of-words-found-in-sentences.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
var mostWordsFound = function(sentences) {
66
let res = 0;
7-
const len = (sentence) => sentence.split(" ").filter(e => e!="").length;
7+
const len = (sentence) => sentence.split(" ").length;
88
for (const sentence of sentences) {
99
res = Math.max(res, len(sentence));
1010
}

0 commit comments

Comments
 (0)