题目描述:
1967. 作为子字符串出现在单词中的字符串数目 - 力扣(LeetCode) (leetcode-cn.com)
Java代码:
class Solution {
public int numOfStrings(String[] a, String w) {
int ans=0;
for(String s:a)if(w.contains(s))ans++;
return ans;
}
}

题目描述:
1967. 作为子字符串出现在单词中的字符串数目 - 力扣(LeetCode) (leetcode-cn.com)
Java代码:
class Solution {
public int numOfStrings(String[] a, String w) {
int ans=0;
for(String s:a)if(w.contains(s))ans++;
return ans;
}
}