You are given an array of strings words where each string has the same length.
A move consists of swapping the characters at index i and index j of a string s such that
Two strings s and t are special equivalent if s can be transformed into t after performing any number of moves.
A group of special equivalent strings is a non-empty subset of words such that every string in the group is special equivalent to every other string in that same group, and no string outside the group is special equivalent to any string in the group.
Return the total number of groups of special equivalent strings in words.
Constraints:
words.length
words[i].length
words[i] consists of lowercase English letters.
All the strings in words are of the same length.
You are given an array of strings words where each string has the same length.
A move consists of swapping the characters at index i and index j of a string s such that
Two strings s and t are special equivalent if s can be transformed into t after performing any number of moves.
A group of special equivalent strings is a non-empty subset of words such that every string in the group is special equivalent to every other string in that same group, and no string outside the group is special equivalent to any string in the group.
Return the total number of groups of special equivalent strings in words.
Constraints:
words.length
words[i].length
words[i] consists of lowercase English letters.
All the strings in words are of the same length.