if len(nums) == 0:return 0 n = max(max(nums),len(nums)) d = [0 for i in range(n+1)] for num in nums: d[num]+=1 return(d[k])