mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-12 10:00:39 -04:00
741 B
741 B
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 65577236b056379d5dbc7000 | Step 23 | 20 | step-23 |
--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. Use the pass keyword to fill the function body.
--hints--
You should define a function named shortest_path.
({ test: () => assert(runPython(`
import inspect
inspect.isfunction(shortest_path)
`))
})
--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--