C
#define MAXN 1010
bool uniqueOccurrences(int* arr, int arrSize){
int count[MAXN*2];
int count_count[MAXN*2];
memset(count,0,sizeof(count));
memset(count_count,0,sizeof(count_count));
int i = 0;
for(;i<arrSize;i++)
{
count[arr[i]+MAXN]++;
}
for(i=0;i<MAXN*2;i++)
{
count_count[count[i]]+=count[i]==0?0:1;
}
for(i = 0;i<MAXN*2;i++)
{
if(count_count[i] >= 2) return false;
}