0PricingLogin
Competitive Programming Academy · Lesson

Adjacency Lists from Input

Build the graph that contests give you.

What a Graph Really Is

A graph is just dots called nodes joined by lines called edges. Cities linked by roads is a graph you already know. 🗺️

Nodes and Edges

Each node is a thing, and each edge says two nodes are connected. Contest graphs usually number nodes from 1 to n.

All lessons in this course

  1. Adjacency Lists from Input
  2. BFS for Shortest Unweighted Paths
  3. DFS, Recursion & Iterative Stacks
  4. Connected Components & Flood Fill
← Back to Competitive Programming Academy