Skip to main content

Practice · 2 of 3

Minimum Vertex Cover

CHALLENGE
Difficulty: advanced+25 XP

**Bài toán.** A rooted tree (root 1), parents for v = 2..n. Print the minimum number of nodes covering every edge. **Constraints:** 1 ≤ n ≤ 200 000. In/out DP where skipping u forces all children to be taken: O(n).

Back to lesson: Practice: Tree DP Trio