input: Write a function to find the most common elements in an array of integers. The function should return a list of integers that have the highest frequency in the given array. If the array is empty, the function should return an empty list.
  
  def most_common(nums):
      counts = {}
  
      for num in nums:
          if num not in counts:
              counts[num] = 0
          counts[num] += 1
  
      max_count = max(counts.values(), default=0)
  
      return [num for num, count in counts.items() if count == max_count]
  
  assert most_common([3, 4, 1, 2, 5, 3, 3])==[3]
  assert most_common([3, 5, 10, 1, 2, 5, 5, 3])==[5]
  assert most_common([4, 4, 2, 2, 2, 4, 4])==[4, 2]
  assert most_common([3, 5, 4, 1, 2])==[3, 5, 4, 1, 2]
  assert most_common([])==[]
output: def most_common(nums):
      counts = {}
  
      for num in nums:
          if num not in counts:
              counts[num] = 0
          counts[num] += 1
  
      max_count = max(counts.values(), default=0)
  
      return [num for num, count in counts.items() if count == max_count]