Using Brute Force and Factorial -
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n        Using Brute-For
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n        Using Brute-Force and Math.Factorial \n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n        O(n*k^2)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n        O(k)\n# Code\n```\nclass Solution:\n    def countAnagrams(self, s: str) -> int:\n        res=1\n        s=s.split()\n        for i in s:\n            dic={}\n            c=1\n            for j in i:\n                if j not in dic:\n                    dic[j]=1\n                else:\n                    dic[j]+=1\n            for j in dic:\n                if dic[j]>1:\n                    c=(c*(math.factorial(dic[j])))\n            t=math.factorial(len(i))\n            n=t//c\n            res=(res*n)\n        return res%((10**9)+7)\n\n```
['Hash Table', 'Math', 'String', 'Combinatorics', 'Counting', 'Python3']