Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 609 Bytes

File metadata and controls

32 lines (22 loc) · 609 Bytes

1636. Question 1636

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Back to top


First completed : July 23, 2024

Last updated : July 23, 2024


Related Topics : N/A

Acceptance Rate : Unknown


Solutions

Python

class Solution:
    def frequencySort(self, nums: List[int]) -> List[int]:
        cnt = Counter(nums)
        return sorted([x for x in nums], key=lambda x: (cnt[x], -x))