Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 684. Redundant Connection
Given edges of an undirected graph that started as a tree with one extra edge, find the edge whose addition creates a cycle and return the one that appears last in the input. This is typically solved by detecting the first edge that connects two vertices already in the same connected component (e.g., with union-find).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.