call of numUnique(list) should return 11 because this list has 11 unique values (1, 2,
Write a method named numUnique that accepts an array of integers as a parameter and returns the number of unique values in that array. The array may contain positive integers…