Detect cycle in a graph and check for forest
Filed under Navi
The question
Given a list of edges, determine if adding them creates a cycle and whether the resulting graph forms a forest.
No write-up yet. Related questions below have one.
Related Navi questions
Collected from public candidate posts and coding forums. Updated Nov 2026.