Skip to content
Snippets Groups Projects
Commit c50abcfa authored by Bruno Freitas Tissei's avatar Bruno Freitas Tissei
Browse files

Fix topological sort

parent 5ac2496d
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ int dfs(int x) {
return 0;
}
// Return number of left elements in matching and fills match array with the
// Returns number of left elements in matching and fills match array with the
// match itself (match[right_i] = left_i)
int bipartite_matching(int n) {
int ans = 0;
......
......@@ -28,7 +28,8 @@ bool dfs(int x) {
}
// Return topological sort of graph with n vertices
// Returns if graph contains cycle or not, and fills tsort vector with
// topological sort of the graph
bool topological_sort(int n, vector<int> &tsort) {
memset(cont, 0, sizeof cont);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment