Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 685. Redundant Connection II
Given a directed graph formed by adding one extra edge to a rooted tree, identify which single edge (returning the one that appears last in the input when multiple choices exist) to remove so every node has exactly one parent and the graph becomes a rooted tree; the core challenge is handling the two cases where the extra edge creates either a node with two parents or a directed cycle.
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.