adjacency list structure in contrast to the edge list representation of graphthe adjacency list structure groups the edges of graph by storing them in smallersecondary containers that are associated with each individual vertex specificallyfor each vertex vwe maintain collection ( )called the incidence collection of vwhose entries are edges incident to (in the case of directed graphoutgoing and incoming edges can be respectively stored in two separate collectionsiout (vand iin (vtraditionallythe incidence collection (vfor vertex is listwhich is why we call this way of representing graph the adjacency list structure we require that the primary structure for an adjacency list maintain the collection of vertices in way so that we can locate the secondary structure (vfor given vertex in ( time this could be done by using positional list to represent with each vertex instance maintaining direct reference to its (vincidence collectionwe illustrate such an adjacency list structure of graph in figure if vertices can be uniquely numbered from to we could instead use primary array-based structure to access the appropriate secondary lists the primary benefit of an adjacency list is that the collection (vcontains exactly those edges that should be reported by the method incident edges(vthereforewe can implement this method by iterating the edges of (vin (deg( )timewhere deg(vis the degree of vertex this is the best possible outcome for any graph representationbecause there are deg(vedges to be reported (ah (bfigure (aan undirected graph (ba schematic representation of the adjacency list structure for collection is the primary list of verticesand each vertex has an associated list of incident edges although not diagrammed as suchwe presume that each edge of the graph is represented with unique edge instance that maintains references to its endpoint vertices