[LeetCode] Counting Words With a Given Prefix

1 · · Feb. 27, 2022, 4:55 a.m.
2185. Counting Words With a Given Prefix You are given an array of strings words and a string pref. Return the number of strings in words that contain pref as a prefix. A prefix of a string s is any leading contiguous substring of s. ...