Driver code
V = 4 NEW_LINE edges = [ [ 0 , 2 ] , [ 0 , 1 ] , [ 1 , 2 ] , [ 2 , 3 ] , [ 2 , 0 ] , [ 3 , 3 ] ] NEW_LINE u , v = 1 , 3 NEW_LINE if ( existPath ( V , edges , u , v ) ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No " ) NEW_LINE DEDENT