File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,15 +38,15 @@ export default function articulationPoints(graph) {
3838 * @param {GraphVertex } previousVertex
3939 */
4040 enterVertex : ( { currentVertex, previousVertex } ) => {
41+ // Tick discovery time.
42+ discoveryTime += 1 ;
43+
4144 // Put current vertex to visited set.
4245 visitedSet [ currentVertex . getKey ( ) ] = new VisitMetadata ( {
4346 discoveryTime,
4447 lowDiscoveryTime : discoveryTime ,
4548 } ) ;
4649
47- // Tick discovery time.
48- discoveryTime += 1 ;
49-
5050 if ( previousVertex ) {
5151 // Update children counter for previous vertex.
5252 visitedSet [ previousVertex . getKey ( ) ] . independantChildrenCount += 1 ;
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ An undirected connected graph with no cut edges
2121
2222## References
2323
24+ - [ GeeksForGeeks on YouTube] ( https://www.youtube.com/watch?time_continue=110&v=thLQYBlz2DM )
2425- [ Wikipedia] ( https://en.wikipedia.org/wiki/Bridge_%28graph_theory%29#Tarjan.27s_Bridge-finding_algorithm )
2526- [ GeeksForGeeks] ( https://www.geeksforgeeks.org/bridge-in-a-graph/ )
26- - [ GeeksForGeeks on YouTube] ( https://www.youtube.com/watch?time_continue=110&v=thLQYBlz2DM )
You can’t perform that action at this time.
0 commit comments