Adjacency lists are compact; matrices make edge checks direct.
Graphs
6 chapters · 15 challenges · The Neon Grid
Understand the idea, practise through play, then prove it in code. Choose your next quest below.
Visual introduction to this topic
What is a graph?
A graph models entities as vertices and relationships as edges. Unlike a tree, it may contain cycles, multiple routes, and disconnected regions.
Think of a game world map. Camps are vertices and roads are edges. Several roads may reach the same camp, so the explorer must remember where they have already been.
Explore connections while visited state prevents loops and duplicate work.
Depth-first follows a route; breadth-first finds fewest edges in an unweighted graph.
Late marking can queue the same vertex repeatedly or loop forever.
Flood one component at a time
DFS
0/3 completePractice DFS through 3 visual expeditions.
BFS
0/3 completePractice BFS through 3 visual expeditions.
Grid Flood
0/3 completePractice grid flood through 3 visual expeditions.
Topological Sort
0/3 completePractice topological sort through 3 visual expeditions.
Cycle Detection
0/2 completePractice cycle detection through 2 visual expeditions.
Bipartite
0/1 completePractice bipartite through 1 visual expedition.
Built from authoritative material
This track is checked against the sources below. Visual traces still carry their own complete or guided coverage label, so unfinished explanations are not presented as complete executions.