leetcode

2255. Count Prefixes of a Given String

Solution code

_m = words[i] _

Time complexity: O(n m)

Space complexity: O(1)