347. Top K Frequent Elements

xiaoxiao2021-02-28  72

class Solution(object):     def topKFrequent(self, nums, k):         """         :type nums: List[int]         :type k: int         :rtype: List[int]         """         dic=zip(*collections.Counter(nums).most_common(k))[0]         return dic             
转载请注明原文地址: https://www.6miu.com/read-76135.html

最新回复(0)