Skip to content
skididdles edited this page Oct 4, 2014 · 4 revisions

Rough Idea Feel free to alter as you see fit

  1. Done: Have a list of total students

  2. Done: for each student in above list, make a list containing the students that the particular student has already been grouped with called studentstruct

  3. For each assignment have a list of students already grouped (at the begining of each will be same as total) iterate through studentstruct

Each iteration: check the next student in studentstruct has already been group with the current student If has'nt been used add student to the currents group and the current student to the selected students group. And remove each from already been grouped list for the current assignment

If it has been used try the next student studentstruct Try the next student untill the group size has been filled

  1. The groups made in each iteration in step 3 need to be added to a list where the first element contains all the groups for assignment1 second all the groups for assignment2...
Clone this wiki locally