Possible Student Group

Hello Developers, Good day, I am trying to implement a group of arrays where I will get a possible unique student list.

Suppose I have Student Array = [{“name”:“AB”,“grade”:10},“name”:“BC”,“grade”:56},{“name”:“AC”,“grade”:11},{“name”:“BB”,“grade”:18},{“name”:“BA”,“grade”:60},{“name”:“CA”,“grade”:90},{“name”:“CB”,“grade”:29},{“name”:“CC”,“grade”:31},{“name”:“DA”,“grade”:14},{“name”:“DB”,“grade”:5}]

Possible Output Expected = [{“name”:“AB”,“grade”:10},{“name”:“BC”,“grade”:18},{“name”:“AC”,“grade”:45}], [{“name”:“AB”,“grade”:60},{“name”:“BB”,“grade”:70},{“name”:“BC”,“grade”:50}],
[{“name”:“AB”,“grade”:90},{“name”:“DC”,“grade”:50},{“name”:“CC”,“grade”:20}],
[{“name”:“CA”,“grade”:40},{“name”:“AB”,“grade”:17},{“name”:“BB”,“grade”:89}] … and so on , Each array will consist maximum 3 students it could be two not less than two or more than three. Two members could be same not three,

In your own words, no code, what is being done to the input to change it? Are input and output arrays the same length, or are matching student records merging?

If you define the transformation, in your own terms, you may find a way forward.

Input would be the list of student array. output length as much as possible not limitation. No mark merging.

I think I’m missing the point: how does the output differ from the input? I see no difference in structure or data.

pls what is your code trying to do