- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

The graph is a non-linear data structures. This represents data using nodes, and their relations using edges. A graph G has two sections. The vertices, and edges. Vertices are represented using set V, and Edges are represented as set E. So the graph notation is G(V,E). Let us see one example to get the idea.

In this graph, there are five vertices and five edges. The edges are directed. As an example, if we choose the edge connecting vertices B and D, the source vertex is B and destination is D. So we can move B to D but not move from D to B.

The graphs are non-linear, and it has no regular structure. To represent a graph in memory, there are few different styles. These styles are −

- Adjacency matrix representation
- Edge list representation
- Adjacency List representation

Here we will see the adjacency list representation −

This representation is called the adjacency List. This representation is based on Linked Lists. In this approach, each Node is holding a list of Nodes, which are Directly connected with that vertices. At the end of list, each node is connected with the null values to tell that it is the end node of that list.

- Related Questions & Answers
- Kernel Data Structures
- Kinetic Data Structures
- Abstract Data Type in Data Structures
- Correspondence Based Data Structures
- Data objects and Structures
- Inbuilt Data Structures in C#
- Inbuilt Data Structures in Python
- Tail Recursion in Data Structures
- Bernoulli Distribution in Data Structures
- Binomial Distribution in Data Structures
- Geometric Distribution in Data Structures
- Stack ADT in Data Structures
- In-built Data Structures in Python
- Data Structures Stack Primitive Operations
- Principles of Recursion in Data Structures

Advertisements