๐Ÿ— Constructing a graph

Unidirectional

  1. Start at root
  2. On each node: save alternate branches (e.g. in list)
  3. Continue until endNode is reached
  4. Go back and pick next branch from list

Bidirectional

  1. Size of quadratic โ›“ Adjacency matrix = number of nodes โ†’ save in array
  2. Create link array from matrix
  3. Iterate through link array
  4. Save each visited node (e.g. in ๐Ÿ”‘ Associative array)