Last Updated: 1 Nov, 2020

Articulation point

Moderate
Asked in companies
AmazonBrevistay

Problem statement

You are given an undirected unweighted graph and you are supposed to find all articulation in the graph.

Input Format:
The first line of input will contain T(number of test cases), each test case follows as.
Line1: contain two space-separated integers denoting the number of vertex and number of edges in the graph respectively.
Next M lines contain two space-separated integers u and v denoting the edge between u and v
Output Format:
For each test case print the list of articulation points in sorted order in a new line.
Constraints:
1 <= T <= 100
1 <= N, M <= 10^4
1 <= u, v <= N