Try all permutations of courses, check which satisfies all prerequisites.
With courses, there are permutations. For , this is astronomically large.
Can you build a valid ordering incrementally?
The trap
Try all permutations of courses, check which satisfies all prerequisites.
With courses, there are permutations. For , this is astronomically large.
Can you build a valid ordering incrementally?