Directed graphs

A graph where the relationship between the nodes in the graph has some sense of direction is called a directed graph. A directed graph is shown here:

Some examples of directed relationships are as follows:

  • Mike and his house (Mike lives in a house, but his house does not live in Mike).

  • John manages Paul (John is the manager of Paul).

Get 40 Algorithms Every Programmer Should Know now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.