Skip to main content
Loading page content
Algo
Flow
Visualizers
Mental Math
Dashboard
Log in
Sign up
Back to Visualizer
Question 1 of 5
Topological Sorting
• DFS Based Topological Sort
How does the DFS-based approach to topological sorting determine the final order?
A
By processing vertices in the order they are first visited
B
By pushing each vertex onto a stack after all its descendants have been fully explored, then reversing the stack order
C
By using a queue exclusively
D
By sorting vertices alphabetically