Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
前往频道在 Telegram
Main channel https://t.me/Coding_000 Contact Admin 👉 @ILOVEU_143 for booking your exam slots Web- https://coding000.github.io/Projects/ 💯% clearance in any placement exams OffCampus -https://t.me/Offcampus_000 Discussion- https://t.me/exams_discussion
显示更多3 337
订阅者
-424 小时
-147 天
-5330 天
帖子存档
✅Share✅Share✅Share ✅share✅
complete 2k😍
@Coding_000
IBM --------😁😁
All IBM solutions will be uploaded there.
Link: @Coding_000😁
✅Share✅Share✅Share ✅share✅
complete 2k😍
i will send solutions tcs 2pm slot
@Coding_000
#include <bits/stdc++.h>
using namespace std;
void countToMakeDiffEqual(int arr[], int n)
{
int ma = 0;
unordered_map<int, int> m;
for (int i = 0; i < n; i++)
{
m[arr[i]]++;
ma = max(ma, m[arr[i]]);
}
if (n <= 2)
cout << 0 << endl;
else if (ma == 1)
{
cout << n - 2 << endl;
}
else
cout << n - ma << endl;
}
signed main()
{
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
countToMakeDiffEqual(a, n);
return 0;
}
C++
@Coding_000
现已上线!2025 年 Telegram 研究 — 年度关键洞察 
