leetcode893】的更多相关文章

You are given an array A of strings. Two strings S and T are special-equivalent if after any number of moves, S == T. A move consists of choosing two indices i and j with i % 2 == j % 2, and swapping S[i] with S[j]. Now, a group of special-equivalent…
class Solution { public: int numSpecialEquivGroups(vector<string>& A) { set<string> ST; for (auto a : A) { vector<char> V1; vector<char> V2; ; i < a.length(); i++) { == )//下标偶数位:0 2 4 6 8... { V1.push_back(a[i]); } else//下标奇…