Matrix as Graph
Prereq: BFS on Graph
Very often, graph problems are represented as matrices. For example:
In most matrix graph problems, the statement will mention adjacent cells being connected.
A matrix translates to a graph (adjacency list):
You are on levelĀ Student
Prereq: BFS on Graph
Very often, graph problems are represented as matrices. For example:
In most matrix graph problems, the statement will mention adjacent cells being connected.
A matrix translates to a graph (adjacency list):
Monster Assistant is thinking...