SergeyPGUTI

Class AdjecencyList

Apr 16th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1. import java.util.ArrayList;
  2.  
  3. //список смежности
  4. public class AdjacencyList {
  5.     ArrayList<Integer> edges[];
  6.     AdjacencyList(int node)
  7.     {
  8.         edges=new ArrayList[node+1];
  9.         for (int i=1;i<=node;i++) {
  10.             edges[i] = new ArrayList<Integer>();
  11.         }
  12.     }
  13. }
Add Comment
Please, Sign In to add comment