Put the steps of Kahn's algorithm into the correct order:
Computer scienceAlgorithms and Data StructuresAlgorithmsGraph algorithmsTopological sorting algorithms
Kahn's algorithm
Step after step
Report a typo
Put the items in the correct order
Get one node out of the queue and add it to the list of the sorted vertices
If the in-degree of the node equals 0 after the reduction, add it to the queue
Put all of the vertices with in-degree equal to 0 in a queue
Reduce the in-degree of the children of the node by one
Count the in-degree for all vertices of the graph
___
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.