Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Define a Directed Acyclic Graph (DAG).
Think about paths that don't loop back.
What does topological sorting achieve?
Consider the impact of prerequisites on ordering.
What defines a Directed Acyclic Graph (DAG)?
Focus on the structure - can you loop back?
True or False: Topological sorting can be applied to any graph.
What about cycles in a graph?
Consider a university with courses A, B, C, D, where A -> B, A -> C, and C -> D. If A must be taken before B and C, how many semesters will be required to complete all courses?
Draw the DAG and analyze the dependencies.
In a given DAG of courses represented by nodes with varying indegrees, propose an algorithm to optimally calculate the longest path.
Think about the maximum values from what you already know.
6 more questions in this section. Enroll free to practise them all.
Enroll free