C++ || Beats 99% || BitMask HashMap
\nclass Solution {\npublic:\n  int similarPairs(vector<string>& words) {\n    unordered_map<int, int> hash_map;\n    int key, ans = 0;\n    \n    for (int i = 0
```\nclass Solution {\npublic:\n  int similarPairs(vector<string>& words) {\n    unordered_map<int, int> hash_map;\n    int key, ans = 0;\n    \n    for (int i = 0; i < words.size(); ++i) {\n      key = 0;\n      for (int k = 0; k < words[i].size(); k++) {\n        key |= 1 << (words[i][k] - \'a\');\n      }\n      hash_map[key]++;\n      ans += (hash_map[key] - 1);\n    }\n    \n    return ans;\n  }\n};\n```
['C', 'Bitmask']