Dsa
Arrays
Medium
Unique Element Frequency
Given an array of integers, determine the number of unique elements whose occurrence frequency is greater than 1. Output the count of such unique elements.
Input:
- The first line contains an integer n, the number of elements in the array (1 ≤ n ≤ 100).
- The second line contains n space-separated integers representing the elements of the array.
Output:
- A single integer representing the count of unique elements with frequency greater than 1.
Example:
Input:
6
1 2 2 3 4 4
Output:
2
Key concepts
arraysfrequencycounting
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now