As a learning exercise, I am writing a library for graphs. As I understand it, graphs can be represented as an adjacency list (i.e. for each node, a list of its adjacent nodes). I would like for my library to represent directed and undirected graphs - am I correct in thinking that for an undirected graph that you would keep a mirror image of adjacency lists?
So, for example, if you have an undirected graph where A and B are adjacent then A's adjacency list would include B and B's adjacency list would include A?