views:

118

answers:

1
+4  A: 

Set cost to infinity or a large value for an edge that does not exist. You can then tell by the result whether an invalid edge was used.

Timmy