Directed acyclic graph

A directed acyclic graph (or DAG) is a graph of nodes and edges between pairs of nodes where each edge has a direction (out of one node and into another) and where no subset of edges forms a cycle (a path of edges from any node to itself).

DAGs include linked lists (a connected graph with no more than one in-edge and one out-edge per node), trees (each node has at most one "parent" in-edge plus any number of "child" out-edges), and skip lists (a hybrid of the two).

list is almost always a doubly-linked list, and the sorted containers (map, set, multimap, and multiset) are almost always red-black trees (or, much less frequently, skip lists).

= See also =


 * Wikipedia