Problem 2306 · Hard

Naming a Company

Group ideas by first letter and compare suffix sets between groups; a swap is valid only when neither new name already exists.

Open the interactive visualisation