The elements of the array are taken as input. The program is to **find out the unique elements from the array**. Unique elements refer to those elements which appear exactly ones in the array.

```
INPUT: The array elements
OUTPUT: the unique elements of the array
PROCESS:
Step 1: [Taking inputs from the user]
Read n [number of elements]
For i = 0 to n-1 repeat
Read a[i]
[End of ‘for’ loop]
Step 2: [Finding the unique elements]
For i=0 to n-1 repeat
Set c<-0
For j=0 to i-1 repeat
If a[i]=a[j] then
Set c<-c+1
[End of ‘if’]
[End of ‘for’ loop]
For k=i+1 to n-1 repeat
If a[i]=a[k] then
Set c<-c+1
[End of ‘if’]
[End of ‘for’ loop]
If c=0 then
Print a[i]
[End of ‘if’]
[End of ‘for’ loop]
```

Related

- Find Maximum and Minimum from an array
- Kth Largest and Smallest Element
- 2nd largest element from the array
- Find how many negative numbers are present in the array
- The elements of the one array are copied to another array.
- Delete element from any position in array
- Frequency of each element in the Array
- Finds odd and even elements from the array and stored in two separate arrays
- Counts the number of odd and even elements separately from the array
- Reverses the elements of an Array
- Merge two Array and stored in the third Array
- Rotated the Array at left
- Rotated the Array right
- Sorted the array and then separate even and odd elements in different array
- Sort number of strings in an array
- Check one given element of an array present more than n/2 times or not.
- Sum of the elements of an Array is calculated using a pointer
- The union and intersection between the two given arrays