Whenever you're ready, walk me through how you'd approach this.
Given a graph of courses and their prerequisites, how would you construct the order you need to take the courses?
Explain how you would represent the graph, produce a valid ordering, detect cycles that make ordering impossible, and handle duplicate prerequisites or disconnected courses. Discuss the expected time and space complexity and how the approach would behave for a large graph.