You are viewing a single comment's thread. Return to all comments →
Check this out
sort(arr.begin(),arr.end()); int count = 0, j = 0; for(int i = 1; i<arr.size(); i++){ if(arr[j] != arr[i]){ j++; count++; } } return count;
Seems like cookies are disabled on this browser, please enable them to open this website
Equalize the Array
You are viewing a single comment's thread. Return to all comments →
Check this out