Geeksforgeeks

Error

×

Leaderboard

Showing:

Handle | Score |
---|---|

@Ibrahim Nash | 6424 |

@blackshadows | 6380 |

@mb1973 | 5704 |

@Quandray | 5245 |

@akhayrutdinov | 5111 |

@saiujwal13083 | 5046 |

@sanjay05 | 3762 |

@kirtidee18 | 3673 |

@mantu_singh | 3532 |

@marius_valentin_dragoi | 3523 |

@sushant_a | 3459 |

Complete Leaderboard | |

Handle | Score |

@cfwong8 | 1160 |

@gurshehzadsingh | 948 |

@nithinreddy3210 | 777 |

@mohanreddy8847 | 702 |

@balwanyadav34 | 622 |

@AkashLahoty | 606 |

@pritsahkar2000 | 596 |

@iamchaitanyahegde | 589 |

@jha8768 | 583 |

@workit | 582 |

@amangiri168 | 576 |

Complete Leaderboard |

Given a graph with **n** vertices, **e** edges and an array **arr[] **denoting the edges connected to each other, check whether it is Biconnected or not.

**Note: **The given graph is Undirected.

**Example 1:**

Input:n =2,e =1arr ={0, 1}Output:1Explanation:0 / 1 The above graph is Biconnected.

**Example 2:**

Input:n =3,e =2arr ={0, 1, 1, 2}Output:0Explanation:0 / 1 \ 2 The above graph is not Biconnected.

**Your Task:**

You don't need to read input or print anything. Your task is to complete the function **biGraph()** which takes 2 Integers n, and e and an array arr of length 2*e as input and returns 1 if the graph is biconnected else returns 0.

**Expected Time Complexity:** O(n+e)

**Expected Auxiliary Space:** O(n)

**Constraints:**

1 <= e <= 100

2 <= n <= 100

Login to report an issue on this page.

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

YesLoading...

Biconnected Graph

...