Accessing each element of an array is called
Answers
Answered by
0
Answer:
Method-1: Using Sorting.
Sort the array.
Check for each element at index i (except the first and last element), if arr[i] != arr[i-1] && arr [i] != arr[i+1]
For the first element, check if arr[0] != arr[1].
For the last element, check if arr[n-1] != arr[n-2].
Explanation:
Similar questions
Math,
14 hours ago
Social Sciences,
14 hours ago
English,
14 hours ago
English,
1 day ago
Math,
8 months ago