algorithms.tutorialhorizon.com
Check if array contains all unique or distinct numbers. | Algorithms
Objective: Given an array of integers, write a program to check if array contains all unique numbers. Example: Integer [] arrA = { 1, 2, 3, 6, 4, 9, 8}; Output: Array has all distinct elements Integer [] arrB = { 1, 2, 3, 6, 4, 9, 8, 2}; Output: Array contains duplicates