input: Write a function to return the number of unique elements in an integer array. If the array is empty then 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([5, 5, 5, 5, 5])==1
  assert num_unique_elements([])==0
  assert num_unique_elements([1, 2, 3, 4, 5])==5
  assert num_unique_elements([10, 20, 10, 30, 20])==3
output: def num_unique_elements(arr):
      if not arr:
          return 0
      unique_arr = set(arr)
      return len(unique_arr)