Company: Amazon_Scientist_27sep
Difficulty: medium
Minimum Classes for Skill Grouping Problem Description Amazon Technical Academy (ATA) provides in-demand, technical training to current Amazon employees looking to broaden their skill sets. ATA has admitted a group of N prospective trainees with varying skill levels. To better accommodate the trainees, ATA has decided to create classes tailored to the skill levels. A placement examination will return a skill level that will be used to group the trainees into classes where levels[i] represent the skill level of trainee i . All trainees within a class must have a skill level within maxSpread , a specified range of one another. Determine the minimum number of classes that must be formed. Complete the function groupStudents in the editor below. groupStudents has the following parameter(s): int levels[n] : the skill level for each student int maxSpread : the maximum allowed skill level difference between any two members of a class Returns: int : the minimum number of classes that can be for