0
/ 20
This method takes an array of integers as a parameter. It returns true if the elements in the array are unique, false otherwise. For...
This method takes an array of integers as a parameter. It returns true if the elements in the array are unique, false otherwise. For example, if the array passed stores {12, 7, -1, 25, 3}, your method should return true; if the array passed stores {5, 3, 5, 2}, your method should return false. An array with 0 or 1 element should be considered unique.
Examples:
isUnique({12, 7, -1, 25, 3}) -> true
isUnique({5, 3, 5, 2}) -> false
Your feedback will appear here when you check your answer.