You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In graph_exists_path function, we determine if there is a path between 2 vertices.
-> in algorithm implementation we use a hash set to remember visited vertices.
But, by this method, it's impossible to know the path, we only know if it exists!
So, to know paths between vertices, we need to modify the algorithm and use a hash map (instead of a hash set) to remember visited vertices and origin vertices.
The text was updated successfully, but these errors were encountered:
graph_dfs_exists_path: use a hash_map (key=target vertex / value=source vertex)
graph_bfs_exists_path: from a vertex source, vertex are visited withan increasing distance. Use a hash_map (key=source vertex / value=integer) to determine the distance
In graph_exists_path function, we determine if there is a path between 2 vertices.
-> in algorithm implementation we use a hash set to remember visited vertices.
But, by this method, it's impossible to know the path, we only know if it exists!
So, to know paths between vertices, we need to modify the algorithm and use a hash map (instead of a hash set) to remember visited vertices and origin vertices.
The text was updated successfully, but these errors were encountered: