Problem 3839 · Medium

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.

Open the interactive visualisation