Available question text
Given an undirected graph with edges usable by Alice-only, Bob-only, or both, compute the maximum number of edges you can remove while still allowing both Alice and Bob to traverse the entire graph (return -1 if impossible). This is a connectivity/union-find problem where you must optimally choose edges—typically by greedily using shared (type-3) edges first—to keep both users' graphs connected and count redundant edges.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1579. Remove Max Number of Edges to Keep Graph Fully Traversable
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source