Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the in-degree of a vertex?
Think about how many edges arrive at a vertex.
Can a vertex with zero in-degree be processed first in topological sorting?
If no tasks depend on it, it can go first!
What is the primary goal of topological sorting?
Think about the purpose of ordering in task management.
True or False: A graph must be acyclic to perform a topological sort.
Remember the nature of cycles and their constraints.
Design an algorithm to implement topological sorting with an input of edges in a directed graph. What are the expected outcomes?
Think about how you can maintain order while processing.
Consider a scenario with tasks {A, B, C, D} and dependencies {A->B, A->C, B->D}. What is a possible topological order?
Every time you select a task, ensure no others depend on it that haven't been completed.
4 more questions in this section. Enroll free to practise them all.
Enroll free