<jupyter_start><jupyter_text>1. Recursive DFS<jupyter_code>dfs = DfsRecursive(g)
dfs.visited
start_node = list(g.vertices())[0]

dfs.dfs(start_node)
dfs.visited<jupyter_output><empty_output><jupyter_text>2. While loop (with stack) DFS<jupyter_code>dfs = DfsIter(g)
dfs.visited
dfs.dfs()
dfs.visited<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1402439024390244, 'fraction_numerical': 0.009146341463414634, 'mean_word_length': 9.612903225806452, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '621681', 'license': 'MIT', 'n_tokens_mistral': 158, 'n_tokens_neox': 157, 'n_words': 18, 'path': 'notebooks/computer_science/Algorithms_and_data_structures_in_python/graphs/graph_demos.ipynb', 'repo_name': 'NathanielDake/NathanielDake.github.io', 'size': '328'}