Site Search:

Graph.java with dfs circle detection output


strict graph {
0[color=red];
1[color=red];
2[color=red];
0--1;
0--2;
1--0;
1--2;
1--3;
2--0;
2--1;
2--3;
2--4;
3--1;
3--2;
3--4;
3--5;
4--2;
4--3;
4--5;
4--6;
5--3;
5--4;
5--6;
5--7;
6--4;
6--5;
6--7;
6--8;
7--5;
7--6;
8--6;
15--16;
16--17;
16--15;
17--16;
19--19;
}
number of points: 13
number of edges: 16
hasCircle: true