Problem 3999 · Hard

Minimum Number of String Groups Through Transformations

Split each word into its even-position and odd-position letters, and rotate each part independently. Each word maps to a canonical pair of smallest rotations, and words sharing a pair form one group.

Open the interactive visualisation