You are given an array of strings words and a string s.
A prefix of a string is a leading contiguous substring.
Return the number of strings in words that are a prefix of s. If the same string appears multiple times in words, count each occurrence independently.
Constraints:
words.length
words[i].length, s.length
words[i] and s consist only of lowercase English letters.
You are given an array of strings words and a string s.
A prefix of a string is a leading contiguous substring.
Return the number of strings in words that are a prefix of s. If the same string appears multiple times in words, count each occurrence independently.
Constraints:
words.length
words[i].length, s.length
words[i] and s consist only of lowercase English letters.