C++ | Easy Solution Using Unordered Set
Complexity\n- Time complexity: O(N)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(N)\n Add your space complexity here, e.g. O(n) \n\n# Co
# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(N)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maximumNumberOfStringPairs(vector<string>& words) {\n        unordered_set<string> s;\n        int maxPair = 0;\n        for(string word : words)\n        {\n            if(s.find(word) != s.end())\n            {\n                maxPair++;\n            }\n            else\n            {\n                reverse(word.begin(),word.end());\n                s.insert(word);\n            }\n        }\n        return maxPair;\n    }\n};\n```
['Hash Table', 'C++']