Question: ( Method 2 ) Now, let's implement a better method: Similarly, take the scores of n students as input, sort them, and then divide them
Method Now, let's implement a better method:
Similarly, take the scores of n students as input, sort them, and then
divide them into k groups.
Again, assume that lower group numbers correspond to higher scores.
It would be ideal if the scores of students within each group were
similar.
Therefore, calculate the variance of student scores in each group, and
aim to minimize the sum of these variances across all groups.
However, each group must have at least one student, and the variance
of a group with only one student is considered to be
Write it in Java code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
