Problem 1258 · Medium

Synonymous Sentences

Merge synonym pairs into transitive groups, then enumerate every sentence that swaps words within their groups.

Open the interactive visualisation