Given edges
edges [ 0 ] . push_back ( 1 ) ; edges [ 1 ] . push_back ( 0 ) ; edges [ 1 ] . push_back ( 2 ) ; edges [ 2 ] . push_back ( 1 ) ; edges [ 2 ] . push_back ( 3 ) ; edges [ 3 ] . push_back ( 2 ) ; edges [ 3 ] . push_back ( 4 ) ; edges [ 4 ] . push_back ( 3 ) ;