From 1d412caaad330d488e4837faeaf2687821bedce0 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Thu, 20 Aug 2026 18:57:44 -0400 Subject: [PATCH] Update the sample graph in the base file --- notes-and-examples/2026.08.11/exercise2.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/notes-and-examples/2026.08.11/exercise2.py b/notes-and-examples/2026.08.11/exercise2.py index 72d9def..f46bb35 100644 --- a/notes-and-examples/2026.08.11/exercise2.py +++ b/notes-and-examples/2026.08.11/exercise2.py @@ -1,11 +1,19 @@ -# see the overview from 2026.07.31 +# See the overview from 2026.07.31. +# Note: I added Anaheim to the sample graph here. The solution should work +# appropriately with either graph. sample_graph = { 'Santa Ana': { 'Los Angeles': 5, + 'Anaheim': 3, 'Palm Springs': 50 }, + 'Anaheim': { + 'Los Angeles': 2, + 'Santa Ana': 3 + }, 'Los Angeles': { + 'Anaheim': 2, 'San Francisco': 25, 'Santa Ana': 5 }, @@ -16,7 +24,7 @@ sample_graph = { 'San Francisco': { 'Los Angeles': 25, 'Palm Springs': 30 - } + } } def possible_paths(start: str, end: str):