How to Remove the Most Edges While Keeping a Graph Fully Traversable for Alice and Bob
Given an undirected graph with three edge types—Alice‑only, Bob‑only, and shared—the task is to delete the maximum number of edges while still allowing both Alice and Bob to reach every node; the solution uses a two‑union‑find strategy, processes shared edges first, then exclusive ones, and returns the count or -1.
