Introduction to Grid Graphs

Cells as nodes, adjacency as edges

A grid is basically a graph. Each cell can be considered as a node. Each adjacent pair is an edge.

When you see it this way, again BFS finds shortest paths, DFS finds connected components, and Dijkstra finds shortest path in a weighted space.

But grids have structure that general graphs don't. I'll show you these grid-specific patterns.

76d5ac75-7088-430f-9201-49c334636e40 (1).png