DSA Studio
Search
Home
Sign in
Graphs Advanced Checkpoint
Topological sorting and shortest paths.
1. In Kahn's algorithm, when do you enqueue a node?
When its in-degree becomes 0
When it is first discovered
When all neighbors are visited
Never; use a stack
2. Dijkstra's algorithm requires all edge weights to be:
3. If a graph has a cycle, a topological ordering:
still exists
does not exist
has duplicates
depends on the cycle
Submit quiz
Auto-advance on pass