When the same number of elements occurs in sorted or unsorted array, then the elements of the array is called the duplicate elements. And we need to delete these duplicate elements or same number from an array to make the resultant array consists of unique elements.
For example, there is an integer type array arr[10] that contains { 5, 8, 3, 3, 5, 9} elements. In this array, 3 and 5 occurs two times. Hence, these elements are duplicate elements. So, after deleting the duplicate elements from an array arr[], we get 5, 8, 3,9 elements.
Output:
Enter No. Of Element:
6
Enter 6 elements for the array:
23
65
36
3
56
23
The array after removing duplicates Elements :
23 65 36 3 56
need an explanation for this answer? contact us directly to get an explanation for this answer