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
The current DFS and BFS methods require a starting vertex as an argument and will only visit vertices that are reachable from these starting vertices. There should be separate methods that don't take such an argument and traverse all vertices in the graph, even if the graph is disconnected.
Maybe, appropriate names could be FullDFS, DFSAll, DFSFull or something like that. It would make more sense to use DFS as a name and rename the method with the starting vertex to DFSFrom, but I don't think I want to break the API at this point.
The text was updated successfully, but these errors were encountered:
The current
DFS
andBFS
methods require a starting vertex as an argument and will only visit vertices that are reachable from these starting vertices. There should be separate methods that don't take such an argument and traverse all vertices in the graph, even if the graph is disconnected.Maybe, appropriate names could be
FullDFS
,DFSAll
,DFSFull
or something like that. It would make more sense to useDFS
as a name and rename the method with the starting vertex toDFSFrom
, but I don't think I want to break the API at this point.The text was updated successfully, but these errors were encountered: