✅ C++ Easy ||  simple solution || Brute Force Approach
Guy\'s if you find this solution helpful \uD83D\uDE0A, PLEASE do UPVOTE.\n\n# Complexity\n- Time complexity: O(N*N)\n Add your time complexity here, e.g. O(n) \
## Guy\'s if you find this solution helpful \uD83D\uDE0A, PLEASE do UPVOTE.\n\n# Complexity\n- Time complexity: O(N*N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int similarPairs(vector<string>& words) \n    {\n        int n=words.size(),ans=0;\n        for(int i=0;i<n;i++)\n        {\n            string s1=words[i];\n            sort(s1.begin(),s1.end());\n            s1.erase(unique(s1.begin(),s1.end()) , s1.end());\n            \n             for(int j=i+1;j<n;j++)\n             {\n                string s2=words[j];\n                sort(s2.begin(),s2.end());\n                s2.erase(unique(s2.begin(),s2.end()) , s2.end());\n                 if(s1==s2)\n                 {\n                     ans++;\n                 }\n             }\n        }\n        return ans;\n    }\n};\n```
['C++']