2. Directed Graph

Introduction

A Directed Graph or Digraph is composed of vertices and directed edges. Each directed edge has a start vertex and an end vertex. The edge is said to point from the start to the end.

Directed graphs can represent one-way relationships. On social media like Twitter or Instagram, if user A follows user B, this can be represented as a directed edge from A to B.

Exercise

Now you can draw two edges (one in each direction) between nodes

  1. 1.

    Try to draw two edges between every nodes