Count Prefix and Suffix Pairs I
Check each earlier word against each later word and count the pairs where the earlier word is both a prefix and a suffix.
Check each earlier word against each later word and count the pairs where the earlier word is both a prefix and a suffix.