return an array storing the end vertices of edge areadjacent( , )test whether vertices and are adjacent replace( , )replace the element stored at vertex with replace( , )replace the element stored at edge with insertvertex( )insert and return new vertex storing element insertedge(vw, )insert and return new undirected edge with end vertices and and storing element removevertex( )remove vertex and all its incident edges and return the element stored at removeedge( )remove edge and return the element stored at there are several ways to realize the graph adt we explore three such ways in the next section data structures for graphs in this sectionwe discuss three popular ways of representing graphswhich are usually referred to as the edge list structurethe adjacency list structureand the adjacency matrix in all three representationswe use collection to store the vertices of the graph regarding the edgesthere is fundamental difference between the first two structures and the latter the edge list structure and the adjacency list structure only store the edges actually present in the graphwhile the adjacency matrix stores placeholder for every pair of vertices (whether there is an edge between them or notas we will explain in this sectionthis difference implies thatfor graph with