Prefix Count
Solve an easy problem of counting prefixes of strings using tries.
Problem statement
A prefix of a string is any leading contiguous substring of the string. Given an array of strings words
and a string pref
, return the number of strings in words
that contain pref
as a prefix.
Example 1
Sample input
Get hands-on with 1200+ tech skills courses.