Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.λΉλμκ° λμ μμλλ‘, μμ kκ°μ elementsλ₯Ό μΆλ ₯νλ λ¬Έμ λ€. νμ΄ 1class Solution: def topKFrequent(self, nums: List[int], k: int) -> List[int]: count = defaultdict(int) for i in nums: count[i] += 1 result = sorted(count, key=count.get, reverse=Tr..