2 C++ solutions || Using hash-map and hash-set approach || Beats 100% !!
Code\n\n// Soution 1 (HashMap)\nclass Solution {\npublic:\n    int maximumNumberOfStringPairs(vector<string>& words) {\n        unordered_map<string, int> mp;\n
# Code\n```\n// Soution 1 (HashMap)\nclass Solution {\npublic:\n    int maximumNumberOfStringPairs(vector<string>& words) {\n        unordered_map<string, int> mp;\n        int ans = 0;\n        for(auto i : words){\n            string rev = i;\n            reverse(rev.begin(), rev.end());\n            if(mp[rev] > 0)\n                ans++, mp[rev]--;\n            else\n                mp[i]++;\n        }\n        return ans;\n    }\n};\n\n// Solution 2 (Using HashSet, beats 100%)\nclass Solution {\npublic:\n    int maximumNumberOfStringPairs(vector<string>& words) {\n        unordered_set<string> s;\n        int ans = 0;\n        for(auto i : words){\n            string rev = i;\n            reverse(rev.begin(), rev.end());\n            if(s.find(rev) == s.end())\n                s.insert(i);\n            else\n                ans++;\n        }\n        return ans;\n    }\n};\n```
['Hash Table', 'C++']