If graph is a tree, there must be n - 1 edges when vertex is n.There must be a cycle if the number of edges is greater or equal to n
If graph is a tree, there must be n - 1 edges when vertex is n.
There must be a cycle if the number of edges is greater or equal to n
Count Edges
undirected only
DFS
both possible
directed - white/gray/black
undirected - true/false
Union Find - disjoint set
no self loop
Last updated 2 months ago