Number of Prefix Connected Groups
Words that share their first k letters form one group, so bucket the words by that prefix and count the buckets with at least two words.
Words that share their first k letters form one group, so bucket the words by that prefix and count the buckets with at least two words.