return - /end getadjunvisitedvert(//end class graph ///////////////////////////////////////////////////////////////class bfsapp public static void main(string[argsgraph thegraph new graph()thegraph addvertex(' ')/ (start for dfsthegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )/ab /bc /ad /de system out print("visits")thegraph bfs()/breadth-first search system out println()/end main(/end class bfsapp ///////////////////////////////////////////////////////////////minimum spanning trees suppose that you've designed printed circuit board like the one shown in figure and you want to be sure you've used the minimum number of traces that isyou don' want any extra connections between pinssuch extra connections would take up extra room and make other circuits more difficult to lay out it would be nice to have an algorithm thatfor any connected set of pins and traces (vertices and edgesin graph terminology)would remove any extra traces the result would be graph with the minimum number of edges necessary to connect the vertices for examplefigure - shows five vertices with an excessive number of edgeswhile figure - shows the same vertices with the minimum number of edges necessary to connect them this constitutes minimum spanning tree figure minimum spanning tree