diff --git a/graphs_trees/graph_path_exists/path_exists_solution.ipynb b/graphs_trees/graph_path_exists/path_exists_solution.ipynb index c6ac3ed..2610c72 100644 --- a/graphs_trees/graph_path_exists/path_exists_solution.ipynb +++ b/graphs_trees/graph_path_exists/path_exists_solution.ipynb @@ -71,7 +71,11 @@ "source": [ "## Algorithm\n", "\n", - "We use breadth-first search to determine the shortest path. Depth-first search is easier to implement with just straight recursion, but often results in a longer path.\n", + "To determine if there is a path, we can use either breadth-first or depth-first search.\n", + "\n", + "Breadth-first search can also be used to determine the shortest path. Depth-first search is easier to implement with just straight recursion, but often results in a longer path.\n", + "\n", + "We'll use a breadth-first search approach:\n", "\n", "* Add the start node to the queue and mark it as visited\n", "* If the start node is the end node, return True\n",