Module Expr Str Assign NameStore Str ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareEq NameLoad NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore AttributeLoad NameLoad attr body If CompareNotIn NameLoad NameLoad body If Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list decorator_list
N/A N/A 
Given a directed graph, design an algorithm to find out whether there is a route between two nodes.

Example
Given graph:

A----->B----->C
 \     |
  \    |
   \   |
    \  v
     ->D----->E
for s = B and t = E, return true

for s = D and t = C, return false
 N/A __author__ Daniel DirectedGraphNode N/A N/A __init__ N/A N/A self x N/A N/A N/A N/A self label x N/A N/A self neighbors N/A N/A N/A Solution N/A object N/A hasRoute N/A N/A self graph s t N/A N/A N/A visited N/A set N/A N/A N/A self dfs s t visited N/A dfs N/A N/A self s t visited N/A N/A N/A pre-check N/A N/A s t N/A N/A True N/A N/A N/A visited add s N/A nbr N/A s neighbors N/A N/A N/A nbr visited N/A N/A N/A N/A self dfs nbr t visited N/A N/A True N/A False N/A N/A