New answers tagged


This is called the offline dynamic storage allocation problem. Check out the papers cited by for a good review of the literature.


Form a directed graph of dependencies, with an edge $x\to y$ if course $x$ is a prerequisite for course $y$. Use Kahn's algorithm to topologically sort the graph. In particular, in each semester, you take all courses with indegree 0 (i.e., all courses where you've satisfied all prerequisites), then delete those courses from the graph. This assumes there ...

Top 50 recent answers are included