Adds code from class that includes does_dfs_path_exist and depth_first_search.