forked from srinathr91/TestJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
26 lines (20 loc) · 678 Bytes
/
Main.java
File metadata and controls
26 lines (20 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.io.IOException;
import java.util.List;
public class Main {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// Construct the digraph from data file
String filePath = "C:/Users/srinath/Desktop/Amazon/Design_analysis/SCC.txt";
Graph g = new Graph(filePath);
// Compute the strongly connected components
List<Integer> components = g.stronglyConnectedComponents();
// Print out sizes of (up to five) of the largest SCCs in comma separated list
int size = components.size();
for(int i = size-1; size - i <= 5 && i >= 0; i--) {
System.out.print(components.get(i) + ",");
}
}
}