Graph Data Structure from Non Linear Data Structure ( #shorts )

1 year ago
5

Hi Friends,

Graph Data Structure from Non Linear Data Structure ( #shorts )

Non-Linear Data Structure : Graph Data Structure

A graph is a data structure that represents a collection of nodes (you can call vertices too) and the connections (you can call edges too) between them.

V = {0, 1, 2, 3}
E = {(0,1), (0,2), (0,3), (1,2)}
G = {V, E}

a graph is a data structure (V, E) that consists of
A collection of vertices V (nodes)
A collection of edges E, represented as ordered pairs of vertices (U,V)

Lets take an example of network objects as a graphical view, where the objects are visible as dots (nodes) and the connections between them are visible as lines (edges).

Eg: A social network can be referred as a graph, where each user is a node and the connections between them considered as their edges(relationships).

There are different types of graphs, eg: directed graphs (in which the edges have a specific direction) and undirected graphs (in which the edges do not have a direction).

Graphs can be used to solve many problems, such as finding the shortest path between two nodes, identifying clusters of nodes that are close connected, and analyzing the structure of complex systems.

#datastructure #graph #graphdatastructure #nonlinear #nonlineardatastructure #nodes #edge #vertice #object #graphical #shortsvideo #shortsfeed #shortsyoutube #shorts #shortvideo #shortsviral #shortvideo #viral #trending #trendingnow #trendingshort #viralshort #trend #princecheema_official #interview #interviewquestion #interviewquestionsanswers #question #answer @princecheema_official

Loading comments...