Vrite a method that takes an array A of integers, and returns true if all the integers in the array are unique, id false if some integer appears more than once. For example, all Unique (X) would return true, since no ilue appears in X more than once, but all Unique (Y) would return false, since the value 200 appears more an once in array Y. X 0 1 50 19 2 3 200 34 4 5 0 87 Y 0 50 1 19 2 200 3 4 0 34 5 6 7 59 200 87
Vrite a method that takes an array A of integers, and returns true if all the integers in the array are unique, id false if some integer appears more than once. For example, all Unique (X) would return true, since no ilue appears in X more than once, but all Unique (Y) would return false, since the value 200 appears more an once in array Y. X 0 1 50 19 2 3 200 34 4 5 0 87 Y 0 50 1 19 2 200 3 4 0 34 5 6 7 59 200 87
Related questions
Question
requirement- The code expected to be relatively short, up to 10 lines
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 images