Fade to Solo
Advanced Graphs

Redundant Connection

30 MINMleetcode ↗

Problem

You start with a tree of n nodes and add one extra edge, creating exactly one cycle. Given all the edges in input order, return the one edge that could be removed to restore a valid tree — if more than one edge could work, return the one that appears last in the input.

30 MIN00:00unlocks in 30:00
locked30:00 left