← All problemsSign in

1579. Remove Max Number of Edges to Keep Graph Fully Traversable

LeetCodeUnion-FindGraph TheoryOpen on judge ↗

Alice and Bob have an undirected graph of n nodes and three types of edges: - Type 1: Can be traversed by Alice only. - Type 2: Can be traversed by Bob only. - Type 3: Can be traversed by both Alice and Bob. Given an array edges where edges[i] = [typei, ui, vi] represents a bidirectional edge of type typei between nodes ui and vi, find the maximum number of edges you can remove so that after r

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start