Skip to content

Commit fa6d3b8

Browse files
authored
Create Number of Strings That Appear as Substrings in Word.java
1 parent 777984a commit fa6d3b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class Solution {
2+
public int numOfStrings(String[] patterns, String word) {
3+
return (int) Arrays.stream(patterns).filter(p -> word.contains(p)).count();
4+
}
5+
}

0 commit comments

Comments
 (0)