EZ Python Code For Beginners O(NLogN)
\nclass Solution:\n    def frequencySort(self, nums: List[int]) -> List[int]:\n        d={}\n        nums.sort()\n        nums=nums[::-1]\n        for i in nums
```\nclass Solution:\n    def frequencySort(self, nums: List[int]) -> List[int]:\n        d={}\n        nums.sort()\n        nums=nums[::-1]\n        for i in nums:\n            if i not in d:\n                d[i]=0\n            d[i]+=1\n        ans=[]\n        d=dict(sorted(d.items(),key=lambda x:x[1]))\n        for i,j in d.items():\n            while d[i]!=0:\n                ans.append(i)\n                d[i]-=1\n        return ans\n```
['Sorting', 'Python']