Here are some steps in a chaotic order. Arrange the options in the correct order to obtain instruction for the topological sort algorithm, introduced in this topic:
Computer scienceAlgorithms and Data StructuresAlgorithmsGraph algorithmsTopological sorting algorithms
DFS-based topological sort
Find the order
Report a typo
Put the items in the correct order
Otherwise, we repeat the procedure recursively for every child of our node.
Choose an unvisited node to begin the procedure.
If the node is already visited, the procedure is done.
If there are no recursive calls to be made, we mark our node as visited and add it at the beginning of the list.
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.