input: Write a function to take an integer array as input and return the number of unique elements in the array. If the array is empty, return 0.
  
  def num_unique_elements(arr):
      if not arr:
          return 0
      unique_arr = set(arr)
      return len(unique_arr)
  
  assert num_unique_elements([1, 2, 3, 2, 1, 4, 7, 8, 9, 8])==7
  assert num_unique_elements([1, 1, 1, 1])==1
  assert num_unique_elements([])==0
  assert num_unique_elements([2, 4, 6, 8])==4
  assert num_unique_elements([100, 200, 100, 300, 200, 400])==4
output: def num_unique_elements(arr):
      if not arr:
          return 0
      unique_arr = set(arr)
      return len(unique_arr)