Files
2024-01-24 19:52:36 +01:00

758 B

id, title, challengeType, dashedName
id title challengeType dashedName
65577236b056379d5dbc7000 Schritt 18 20 step-18

--description--

Now you are going to start developing the algorithm to calculate the shortest path between each node in your new graph.

Declare an empty function called shortest_path and don't forget the pass keyword.

--hints--

You should have a shortest_path function.

({ test: () => assert(__pyodide.runPython(`
    import inspect
    f = __locals.get("shortest_path")
    inspect.isfunction(f)
  `))
})

--seed--

--seed-contents--

--fcc-editable-region--
my_graph = {
    'A': [('B', 3), ('D', 1)],
    'B': [('A', 3), ('C', 4)],
    'C': [('B', 4), ('D', 7)],
    'D': [('A', 1), ('C', 7)]
}


--fcc-editable-region--