Grokking Data Structures & Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Introduction to Graph
On this page

A graph is a data structure used to represent relationships or connections between objects. A graph consists of two main parts:

  • Vertices (Nodes): Represent the individual objects.
  • Edges (Links): Represent the connections between those objects.

A graph is often denoted as G(V, E) where:

  • V is the set of vertices.
  • E is the set of edges connecting pairs of vertices.

Example

Consider a graph with five nodes A, B, C, D, and E, and the following connections:

This graph forms a network of connections, where you can traverse from one node to ano

.....

.....

.....

Like the course? Get enrolled and start learning!

On this page