Editing Topological sort
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 59: | Line 59: | ||
The topological ordering will be unique if and only if <code>C</code> contains exactly one vertex at the beginning of each iteration of the while loop. The proof is left as an exercise to the reader. | The topological ordering will be unique if and only if <code>C</code> contains exactly one vertex at the beginning of each iteration of the while loop. The proof is left as an exercise to the reader. | ||
− | + | A topological ordering can also be obtained by running [[depth-first search]] and then reversing the postordering generated. | |
− | + | ||
− | + | ||
==External links== | ==External links== | ||
* {{SPOJ|PFDEP|Project File Dependencies}} | * {{SPOJ|PFDEP|Project File Dependencies}} | ||
* {{SPOJ|DEPEND|Dependency Problems}} | * {{SPOJ|DEPEND|Dependency Problems}} |