Closed hmm34 closed 10 years ago
The graph is using the size of the adjacency list in BFS, which does not necessarily represent the number of nodes in the graph. Count the number of nodes in the graph during construction and use in BFS instead.
Oops. Fixed. :wheelchair:
The graph is using the size of the adjacency list in BFS, which does not necessarily represent the number of nodes in the graph. Count the number of nodes in the graph during construction and use in BFS instead.