-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Explanation for ArticulationPoint.java
- Loading branch information
1 parent
d05be77
commit 3c3dcee
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Class ArticulationPoint | ||
|
||
Given a graph generated using GraphBuilder.makeGraph(), this class finds all articulation points in graph. Since GraphBuilder assumes 0-based indexing, this class also works assuming 0-based indexing. | ||
|
||
All members of this class are static, so no constructor defined. | ||
|
||
## Methods | ||
|
||
### articulationPoints | ||
``` | ||
public static boolean[] articulationPoints(int[][] graph) | ||
``` | ||
Returns boolean array of length $N$ where $N$ denotes the number of nodes in given graph, i-th element in this boolean array denotes whether i-th node in given graph is an articulation point or not. | ||
|
||
** Constraints ** | ||
* graph is generated using GraphBuilder.makeGraph(), so all constraints applicable to makeGraph method applies. | ||
|
||
** Computational complexity ** | ||
* $ O (NumberOfNodes + NumberOfEdges) $ |