Driver code
var V = 4 ; var edges = [ [ 0 , 2 ] , [ 0 , 1 ] , [ 1 , 2 ] , [ 2 , 3 ] , [ 2 , 0 ] , [ 3 , 3 ] ] ; var u = 1 , v = 3 ; if ( existPath ( V , edges , u , v ) ) document . write ( " " ) ; else document . write ( " " ) ;