✅Runtime 12 ms Beats 🚀100% and 💡Memory 13 MB Beats 📉99.67%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Runtime 12 ms Beats \uD83D\uDE80100% \n```\nclass Solution(object):\n    def maximumNumberOfStringPairs(self, words):\n        pairs = 0\n        reverse_dict = {}\n\n        for word in words:\n            reverse_word = word[::-1]\n            if reverse_word in reverse_dict:\n                pairs += reverse_dict[reverse_word]\n                reverse_dict[reverse_word] += 1\n            else:\n                reverse_dict[word] = 1\n\n        return pairs\n```\n![Screen Shot 2023-10-19 at 21.29.06.png](https://assets.leetcode.com/users/images/d30ceb3f-16f8-4f4f-badb-3c1bc5f5672f_1697732990.1202688.png)\n\n# Memory 13 MB Beats \uD83D\uDCC999.67%\n\n```\nclass Solution(object):\n    def maximumNumberOfStringPairs(self, words):\n        arr = []\n        for i in words:\n            demo_arr = []\n            for j in words:\n                if i[::-1] == j or i == j:\n                    demo_arr.append(j)\n            if len(demo_arr) > 1:\n                arr.append(demo_arr)\n        return int(len(arr) / 2)\n```\n![Screen Shot 2023-10-19 at 21.28.50.png](https://assets.leetcode.com/users/images/efc52bb4-bf9a-41f4-83fb-3bdaac946246_1697732959.5790963.png)\n\n# \u2B06\uFE0F Please upvote \u2B06\uFE0F\n\n\n\n\n
['Python']