1class Solution:2 def frequencySort(self, nums: List[int]) -> List[int]:34 r = Counter(nums).most_common()5 r.sort(key=lambda x: x[0], reverse=True)6 r.sort(key=lambda x: x[1])78 t = []9 for i in r:10 a, b = i11 t.extend([a] * b)1213 return t
WPM •0 •0
ACC •0 •0
TIME •0