A directed graph is a set of vertices (nodes) connected by edges, with each node having a direction associated with it.
Edges are usually represented by arrows pointing in the direction the graph can be traversed.
In the example on the right, the graph can be traversed from vertex A to B, but not from vertex B to A.
In an undirected graph the edges are bidirectional, with no direction associated with them. Hence, the graph can be traversed in either direction. The absence of an arrow tells us that the graph is undirected.
In the example on the left, the graph can be traversed from node A to B as well as from node B to A.
Some more complex directed and undirected graphs might look like the following:
Free Resources