pub fn has_cycle_undirected(graph: &[Vec<usize>]) -> boolExpand description
Detect whether an undirected graph contains a cycle.
Pass the adjacency list and edges must already be reciprocal (i.e.,
for any edge u -- v you must include both v in graph[u] and
u in graph[v]).