Find Maximum Number Of String Pairs Solution in C++
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nUsing Unordered map\n# 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nUsing Unordered map\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n^2)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n)\n# Code\n```\nclass Solution {\npublic:\n    int maximumNumberOfStringPairs(vector<string>& words) {\n        unordered_map<string, string> mp;\n        int i, count=0;\n        for(i=0 ; i<words.size() ; i++)\n        {\n            string str = words[i];\n            reverse(str.begin(), str.end());\n            if(mp.find(str)!=mp.end())\n            {\n                mp[str] = words[i];\n                count++;\n            }\n            else\n            {\n                mp[words[i]] = "";\n            }\n        }\n        return count;\n    }\n};\n```\n![upvote new.jpg](https://assets.leetcode.com/users/images/0933a2a5-9a92-4f43-a9a0-46eeda81e2b2_1694801285.4025972.jpeg)\n
['C++']