Simple C++ Solution
Code\n\nclass Solution {\n    int helper(int n){\n        if(n == 1)\n            return 1;\n        return n + helper(n-1);\n    }\npublic:\n    int similarPai
# Code\n```\nclass Solution {\n    int helper(int n){\n        if(n == 1)\n            return 1;\n        return n + helper(n-1);\n    }\npublic:\n    int similarPairs(vector<string>& words) {\n        unordered_map <string,int> ump;\n        for(auto &it:words){\n            set <char> st;\n            for(auto &jt:it)\n                st.insert(jt);\n            string tmp = "";\n            for(auto &s:st)\n                tmp += s;\n            ump[tmp]++;\n        }\n        int ans = 0;\n        for(auto &it:ump){\n            if(it.second > 1)\n                ans += helper(it.second-1);\n        }\n        return ans;\n    }\n};\n```
['Array', 'Hash Table', 'Ordered Map', 'Ordered Set', 'C++']