Biconnected Graph
Submissions: 1154   Accuracy:

35.28%

  Difficulty: Medium   Marks: 4

Given a graph, check whether it is Biconnected or not. 

Input:
First line consists of T test cases. First line of every test case consists of 2 integers N, E,denoting the number of vertices and number of edges respectively. Second line of every test case consists of pair of E spaced integers, denoting the edges connecting each other.

Output:
Single line output, print 1 if graph is biconnected else 0.

Constraints:
1<=T<=100
1<=N,E<=100

Example:
Input:

3
2 1
0 1
5 6
1 0 0 2 2 1 0 3 3 4 2 4
3 2
0 1 1 2
Output:
1
1
0

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Raj Seth
Author: saksham seth


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.