How to be in top by time complexity
Code\n\nclass Solution:\n    def maximumNumberOfStringPairs(self, words: List[str]) -> int:\n        total = 0\n        c = set()\n        for i in range(len(wo
# Code\n```\nclass Solution:\n    def maximumNumberOfStringPairs(self, words: List[str]) -> int:\n        total = 0\n        c = set()\n        for i in range(len(words)):\n            for j in range(i + 1, len(words)):\n                word1 = words[i]\n                word2 = words[j]\n\n                if word1 == word2[::-1] and word1 not in c and word2 not in c:\n                    total += 1\n                    c.add(word1)\n                    c.add(word2)\n        return total\n```
['Python3']