Determine whether an undirected graph is biconnected. A graph is biconnected if it is connected and remains connected after removing any single vertex. Pattern focus: Articulation Points. A graph is biconnected exactly when it has no cut vertices.
n = number of vertices, edges = undirected edges [u, v]
true if the graph is connected and has no articulation point
Example 1:
Input:
n = 4 edges = [[1,2],[2,3],[3,4],[4,1]]
Output:
true
Explanation:
A simple cycle is biconnected.
Example 2:
Input:
n = 4 edges = [[1,2],[2,3],[3,4]]
Output:
false
Explanation:
A path has articulation points, so it is not biconnected.
Example 3:
Input:
n = 5 edges = [[1,2],[2,3],[3,1],[3,4],[4,5]]
Output:
false
Explanation:
Vertex 3 is a cut vertex, so the graph is not biconnected.