Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- //список смежности
- public class AdjacencyList {
- ArrayList<Integer> edges[];
- AdjacencyList(int node)
- {
- edges=new ArrayList[node+1];
- for (int i=1;i<=node;i++) {
- edges[i] = new ArrayList<Integer>();
- }
- }
- }
Add Comment
Please, Sign In to add comment