Lessons
C++ · Graphs · 47. What a Graph Is

step 1 of 6

Dots and roads

A graph is dots joined by roads. Dots are nodes: towns, people. Roads are edges.

I keep one list per node: who it is joined to. adj[0] is node 0's list.

Mission

Build a road between 0 and 3, then RUN.

PIP·1
main.cppyour code
1
2
3
4
5
6
7
8
9
10
11
12
13
← press me!
readyscreen

Press RUN to see what this program does.

Do the mission and Next turns green.

What a Graph Is