# Do breadth first search from both ends at the same time. # Keep a set of all nodes that each has reached. # When the sets have any element in common, there is a path.
# Do breadth first search from both ends at the same time.
# Keep a set of all nodes that each has reached.
# When the sets have any element in common, there is a path.

jialing3/corner_cases,jialing3/corner_cases