File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,15 @@ export default function articulationPoints(graph) {
38
38
* @param {GraphVertex } previousVertex
39
39
*/
40
40
enterVertex : ( { currentVertex, previousVertex } ) => {
41
+ // Tick discovery time.
42
+ discoveryTime += 1 ;
43
+
41
44
// Put current vertex to visited set.
42
45
visitedSet [ currentVertex . getKey ( ) ] = new VisitMetadata ( {
43
46
discoveryTime,
44
47
lowDiscoveryTime : discoveryTime ,
45
48
} ) ;
46
49
47
- // Tick discovery time.
48
- discoveryTime += 1 ;
49
-
50
50
if ( previousVertex ) {
51
51
// Update children counter for previous vertex.
52
52
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
21
21
22
22
## References
23
23
24
+ - [ GeeksForGeeks on YouTube] ( https://www.youtube.com/watch?time_continue=110&v=thLQYBlz2DM )
24
25
- [ Wikipedia] ( https://en.wikipedia.org/wiki/Bridge_%28graph_theory%29#Tarjan.27s_Bridge-finding_algorithm )
25
26
- [ 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