Problem 2506 · Easy

Count Pairs Of Similar Strings

Give each word a key made of its distinct letters, then count earlier words that share the same key in a hash map.

Open the interactive visualisation