๐ Constructing a graph
Unidirectional
- Start at root
- On each node: save alternate branches (e.g. in list)
- Continue until endNode is reached
- Go back and pick next branch from list
Bidirectional
- Size of quadratic โ Adjacency matrix = number of nodes โ save in array
- Create link array from matrix
- Iterate through link array
- Save each visited node (e.g. in ๐ Associative array)