Back to problems

Course Scheduler — Print Path (Simplified)

Algorithm · Oracle · Easy

Requirements Input: a map from each course to its optional immediate prerequisite; a course with no prerequisite maps to null. Each course names no more than one immediate prerequisite; courses requiring several prerequisites are explicitly excluded. Output: produce and print an ordering where any prerequisite of a course, when present, occurs before that course. Because a course may have only one direct predecessor, this is not the full DAG ordering problem: the graph forms…

Checking your access…