Search
⌘K

Leetcode 893. Groups of Special-Equivalent Strings

Count the number of equivalence classes of strings under the relation that allows arbitrary swaps among even indices and among odd indices. Key idea: each string's invariant is the multiset (or sorted sequence) of its even-indexed characters and of its odd-indexed characters — strings with the same pair form are special-equivalent.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.