Check if all array elements are distinct
Given an array, check whether all elements in an array are distinct or not. Examples: Input : 1, 3, 2, 4Output : Yes Input : "Geeks", "for", "Geeks"Output : No Input : "All", "Not", "Equal"Output : Yes One simple solution is to use two nested loops. For every element, check if it repeats or not. If