Backtrack through the last visited nodes
for ( int y = 0 ; y < road_used . size ( ) ; y ++ ) { if ( road_used . get ( y ) . get ( 1 ) == u ) { dfsUtil ( road_used . get ( y ) . get ( 0 ) , node , visited , road_used , u , it + 1 ) ; } } }