sec graph traversals /adjacency list graph implementation class graphl implements graph private graphlist[vertexprivate int numedgepublic int[markpublic graphl({public graphl(int ninit( )/the vertex list /number of edges /the mark array /constructor public void init(int nmark new int[ ]vertex new graphlist[ ]for (int = <ni++vertex[inew graphlist()numedge public int (return mark length/of vertices public int (return numedge/of edges public int first(int /get ' first neighbor if (vertex[vlength(= return mark length/no neighbor vertex[vmovetostart()edge it vertex[vgetvalue()return it vertex()public int next(int vint /get next neighbor edge it nullif (isedge(vw)vertex[vnext()it vertex[vgetvalue()if (it !nullreturn it vertex()else return mark lengthfigure an implementation for the adjacency list