Constructing the undirected graph
graph . get ( 1 ) . add ( 2 ) ; graph . get ( 2 ) . add ( 1 ) ; graph . get ( 3 ) . add ( 4 ) ; graph . get ( 4 ) . add ( 3 ) ; graph . get ( 4 ) . add ( 5 ) ; graph . get ( 5 ) . add ( 4 ) ; graph . get ( 6 ) . add ( 7 ) ; graph . get ( 7 ) . add ( 6 ) ; octalValue ( graph , V , values ) ; } }