Using a Hash Table to Store Adjacency Lists

Making the hash table in the Graph constructor:

     adj_hash = new Hashtable<Vertex, List<Vertex>>();

To create a new adjacency list for vertex v1:

     adj_hash.put(v1, new LinkedList<Vertex>());

To get a vertex v1's adjacency list:

     adj_hash.get(v1);

To add vertex v2 to vertex v1's adjacency list:

     adj_hash.get(v1).add(v2);