Leetcode in Java && Oracle
419 subscribers
8 photos
397 files
400 links
Second channel: @codeforces_java

Let's Develop Together!
Download Telegram
image_2021-11-07_19-05-02.png
28.9 KB
#N1967. Number of Strings That Appear as Substrings in Word
problem link

#solution
class Solution {
public int numOfStrings(String[] patterns, String word) {
int count=0;
for(String pattern:patterns){
if(word.contains(pattern))
count++;
}

return count;
}
}