DEV Community

Cover image for Types of Graph
Aya Bouchiha
Aya Bouchiha

Posted on

3 1

Types of Graph

Hello, today, I'm gonna discuss the famous types of graphs, before reading this post, I suggest you check this post (introduction to graph in data structure) firstly.

Types of Graph

  • Directed Graph : (also called directed network or digraph) in this type, every edge is directed from one node to another.

Directed graph in data structure Aya Bouchiha

  • Undirected Graph: all the edges can be traversed from both directions.

Undirected graph in data structure Aya Bouchiha

  • Weighted Graph: in this one, all edges have a weight which is a numerical value

Weighted graph in data structure Aya Bouchiha

  • Unweighted Graph: the opposite of weighted graph, each edge has not a weight

  • Connected Graph: a connected graph is a graph that has a path between every pair of nodes.

Connected graph in data structure Aya Bouchiha

  • Disconnected Graph: a graph is called disconnect if there is at least two nodes of the graph are not connected by a path.

Disconnected graph in data structure Aya Bouchiha

  • Simple Graph: a graph is simple if it has no loops and no multiple edges.

Simple graph in data structure Aya Bouchiha

Reference and useful resources

if you have any suggestions, you can contact me on telegram, see you next post.

Have a great day :)
#day_25

Reinvent your career. Join DEV.

It takes one minute and is worth it for your career.

Get started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️