Graphs: BFS & DFS

Nodes and edges

A graph is nodes connected by edges β€” more general than a tree (cycles allowed, no single root). The most practical representation for problems is an adjacency map: a hash from each node to the list of its neighbors.

Anchor it in PawWalk: neighborhoods connected by walkable routes. Which neighborhoods can a walker reach on foot from where they are?