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

Let's Develop Together!
Download Telegram
image_2022-03-19_01-13-18.png
27.8 KB
#N2185. Counting Words With a Given Prefix
problem link

#solution
class Solution {
public int prefixCount(String[] words, String pref) {
int count=0;

for(String word: words){
if(word.startsWith(pref))
count++;
}

return count;
}
}
🔥2