A tree with nodes has exactly edges. Given a graph that started as a tree but has one extra edge, find and return that edge. The extra edge creates exactly one cycle.
Return the edge that, if removed, would restore the tree structure. If multiple answers, return the one appearing last in the input.
Example: edges returns . You're performing cycle detection: the redundant edge connects two nodes that are already in the same component. Constraints: from to .