Backtrack through the last visited nodes
for ( let y = 0 ; y < road_used . length ; y ++ ) { if ( road_used [ y ] [ 1 ] == u ) { dfsUtil ( road_used [ y ] [ 0 ] , node , visited , road_used , u , it + 1 ) ; } } }