Back to Freecodecamp

Step 15

curriculum/challenges/english/blocks/learn-algorithm-design-by-building-a-shortest-path-algorithm/6579dd49fa8a8e1fd06b85a9.md

latest1.1 KB
Original Source

--description--

Graphs are data structures representing relations between pairs of elements. These elements, called nodes, can be real-life objects, entities, points in space or others. The connections between the nodes are called the edges.

Here's a visual representation of a graph:

Rename the copper dictionary into my_graph. This will represent the graph to test your algorithm.

--hints--

You should rename your copper dictionary into my_graph.

js
({ test: () => assert(__userGlobals.has("my_graph")) })

Your my_graph variable should be a dictionary.

js
({ test: () => assert(runPython(`
    type(my_graph) is dict 
  `))
})

--seed--

--seed-contents--

py
--fcc-editable-region--
copper = {
    'species': 'guinea pig',
    'age': 2
}
--fcc-editable-region--