diff --git a/notes-and-examples/2026.08.11/exercise1.py b/notes-and-examples/2026.08.11/exercise1.py index bf24475..5a079c0 100644 --- a/notes-and-examples/2026.08.11/exercise1.py +++ b/notes-and-examples/2026.08.11/exercise1.py @@ -13,16 +13,32 @@ sample_graph = { 'Mallory': set(['Carol', 'Grace']) } +# This is an in-progress exercise + def nth_degree_connections( graph: dict[str, set[str]], starting_vertex: str, max_n: int ): - # TODO - pass + checkinglist=[[starting_vertex,0]] + listvisited=list() + x=[0,0] + while len(listvisited)!=len(graph) and checkinglist!=[] and x[1]