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):