Graph

Graph Properties

Graph is a data structure that consists of following two components:

  • A finite set of vertices also called as nodes.
  • A finite set of pair of the form (u, v) called as edge.

Basics Attributes

  • Directed and Undirected: (u, v) and (v, u) might be different
  • Weighted and Unweighted: each edge might have a weight
  • Cyclic and Acyclic

Commonly used representations of graph

Adjacency Matrix

Adjacency List

The adjacency list describes outgoing edges.

Complexity

results matching ""

    No results matching ""