leetcode-potd

2416. Sum of Prefix Scores of Strings

leetcode-potd

You are given an array words of size n consisting of non-empty strings. We define the score of a string word as the number of strings words[i] such that word is a prefix of words[i]. For example, if words =

Scroll to Top