Problem Statement
.
You are participating in a Mathematics Olympiad. During the olympiad, you are given a sequence in an array
Your task is to ensure all elements of the array have the same frequency. The term "same frequency" means that
all the elements occur the same number of times in the array
To ensure same frequency, you are only allowed to delete elements from the array.
Your task is to find the minimum number of deletions needed to ensure all elements in the array have the same
frequency
Input Format
The first line contains an integer, N, denoting the number of elements in the array
Each line i of the N subsequent line contains an integer describing the i-th element of the array.
2.
Constraints
1 CEN <= 2*10^5
1 <= array[o) <= 10^9
2
Answers
Answer:
helloCEN <= 2*10^5
1 <= array[o) <= 10
Explanation:
I think it will help you
Answer: helloCEN <= 2*10^5
1 <= array[o) <= 10
Explanation: You are participating in a Mathematics Olympiad. During the olympiad, you are given a sequence in an array
Your task is to ensure all elements of the array have the same frequency. The term "same frequency" means that
all the elements occur the same number of times in the array
To ensure the same frequency, you are only allowed to delete elements from the array.
Your task is to find the minimum number of deletions needed to ensure all elements in the array have the same
frequency
Input Format
The first line contains an integer, N, denoting the number of elements in the array
Each line i of the N subsequent line contains an integer describing the i-th element of the array.
2.
Constraints
1 CEN <= 2*10^5
1 <= array[o) <= 10^9
2
So the output is helloCEN <= 2*10^5
1 <= array[o) <= 10
#SPJ3