Easy solution with detailed explanation: PYTHON
Approach\n Describe your approach to solving the problem. \nOur first job should be to figure out how could we store each word uniquely and without repeating ch
# Approach\n<!-- Describe your approach to solving the problem. -->\nOur first job should be to figure out how could we store each word uniquely and without repeating characters. So we can typecase our string to set and then sort it finally convert it back to string. Then we will store our modified string in a hashmap or a dictionary with the value being the number of occurrences of our string.\nFinally we can do some math to calculate the total pairs. The math goes like this: Eg. \na. { "ab" : 2 } means two pairs\nb. { "ab" : 3 } means three pairs\nc. { "ab" : 4 } is not 4 instead its 6\nd. { "ab" : 5 } is not 5 instead its 10\nSo we can derive a formula (n * (n - 1)) / 2. This the general formula of the sum of numbers from 1 to n.\n# Complexity\n- Time complexity: $$O(n*m)$$, m is the average word length\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```python3 []\nclass Solution:\n    def similarPairs(self, words: List[str]) -> int:\n        map = dict()\n        count = 0\n        for word in words:\n            sorted_chars = \'\'.join(sorted(set(word)))\n            map[sorted_chars] = map.get(sorted_chars, 0) + 1\n\n        for val in map.values():\n            count += (val * (val - 1)) // 2\n        \n        return count\n```
['Hash Table', 'Math', 'String', 'Python', 'Python3']