Count Prefix and Suffix Pairs II

Solve Count Prefix and Suffix Pairs II.

Examples
Input: []
Output: 0
Hints

Count Prefix and Suffix Pairs II

Solve **Count Prefix and Suffix Pairs II**. This entry was scaffolded in Trie Mastery migration and should be refined with full statement/examples.