Count articulation points
Your task
Given an undirected simple graph on n nodes (0..n-1) as edges [u, v] (no self loops or parallel edges), return the number of articulation points (cut vertices): nodes whose removal (with their incident edges) increases the number of connected components. Constraints: 1 <= n <= 60.
Examples
count_articulation(n: int, edges: list[list[int]]) -> intExample 1
Input
count_articulation(5, [[0, 1], [1, 2], [2, 0], [2, 3], [3, 4]])Output
2