Hi Yashwanth,
I think the question gives to 2 variables to use, that is n and k. K being the total number of students. n being the number of students who are willing to learn from the coach.
From the explanation below the question, in first team, you are to divide 6 member of unequal names into two teams, with their names having the same length. you can use the length of
String (length())
StringofLength to help you. In the second team you are to divide 4 member of unequal names into 2 teams, with their names having the same length.