Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 437 Bytes

Graphs.md

File metadata and controls

6 lines (5 loc) · 437 Bytes

Graphs

A graph is a data structure that consists of the following two components:

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

The pair is ordered because (u, v) is not the same as (v, u) in case of a directed graph(di-graph). The pair of the form (u, v) indicates that there is an edge from vertex u to vertex v. The edges may contain weight/value/cost.