I could use some help coming up with the best way to solve this problem. I've been curious as to how something like this would work, as the worst case seems way too bad.
Problem
Given a group of students and the courses they are enrolled in, and a schedule with 8 class blocks in it, how could you place them in specific classes?
Keeping in mind you can have as many classes for a specific course as long as there is a teacher who is free to teach the class.
Specifics
There are 8 class "slots" where you can put any class, but a teacher can not teach two classes at once.
Inputs and outputs
The input is a list of students each with data on which courses they are taking. There is not specific data structure I have in mind, the problem is more theoretical than literal.
The output would be assigning a value 1-8 to each class, specifying when they would take it.