| 1 | class Solution { |
| 2 | public int prefixCount(String[] words, String pref) { |
| 3 | int count=0; |
| 4 | int len = pref.length(); |
| 5 | for(String word : words){ |
| 6 | if(len <= word.length()){ |
| 7 | String sub = word.substring(0,len); |
| 8 | if(pref.equals(sub)){ |
| 9 | count++; |
| 10 | } |
| 11 | } |
| 12 | } |
| 13 | return count; |
| 14 | } |
| 15 | } |
nothing calls this directly
no outgoing calls
no test coverage detected