Q2744 Accepted C++ ✅ HashMap O(n) | Easiest Method
\nclass Solution {\npublic:\n    int maximumNumberOfStringPairs(vector<string>& words) {\n        int n = words.size();\n        int count = 0;\n        unorder
```\nclass Solution {\npublic:\n    int maximumNumberOfStringPairs(vector<string>& words) {\n        int n = words.size();\n        int count = 0;\n        unordered_map <string,int> mp;\n        for(int i=0;i<n;i++){\n            if(words[i][0] > words[i][1]){\n                swap(words[i][0],words[i][1]);\n            }\n            mp[words[i]]++;\n        }\n            \n        for(auto i : mp)\n            count += i.second/2;\n        \n        return count;\n    }\n};\n```
['C']