Sum of Prefix Scores of Strings
Count how many words share each prefix once, then a word score is the sum of the counts along its own prefixes.
Count how many words share each prefix once, then a word score is the sum of the counts along its own prefixes.